dlandon's docker zm_detect.py cannot find numpy

Support for the docker image maintained by dlandon
Post Reply
SpikeyGG
Posts: 60
Joined: Mon Oct 15, 2012 12:02 am

dlandon's docker zm_detect.py cannot find numpy

Post by SpikeyGG »

I'm trying to use dlandon's zm ml docker. I've used the command:

Code: Select all

docker run -d --name="zoneminder" --net="bridge" -p 9001:9000/tcp -p 8080:80/tcp -e TZ="America/Boise" --shm-size="8G" -e SHMEM="50%" -e PUID="99" -e PGID="100" -e INSTALL_HOOK="1" -e INSTALL_FACE="0" -e INSTALL_TINY_YOLO="0" -e INSTALL_YOLO="1" -e MULTI_PORT_START="0" -e MULTI_PORT_END="0" -v "/home/spikeygg/zm/config":"/config":rw -v "/home/spikeygg/zm/data":"/var/cache/zoneminder":rw dlandon/zoneminder
I removed the --privileged="true" switch because I kept running into:

Code: Select all

Starting MariaDB database server mysqld
...fail!
and found https://github.com/dlandon/zoneminder/issues/91 where keco185 suggested that removing the privileged switch fixed the issue. It worked for me too but I don't know why or what the ramifications are. Is there a better way to get this to work?

Everything seems to complete successfully and I've been able to stand up my camera array within dlandon's ZM docker installation. However, when I try to manually execute zm_detect.py or zm_event_start.sh it cannot find numpy. I try to run python3 and import numpy and it cannot find it. There doesn't seem to even be a pip installed so I cannot manually install it...

Code: Select all

root@af5fb16a6bfe:/var/lib/zmeventnotification/bin# ./zm_detect.py
Traceback (most recent call last):
  File "./zm_detect.py", line 13, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
root@af5fb16a6bfe:/var/lib/zmeventnotification/bin# ./zm_event_start.sh
Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 13, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

root@af5fb16a6bfe:/var/lib/zmeventnotification/bin#
I can manually launch zmeventnotification.pl and see trigger events from the cameras but nothing happens after that (no notification, no object detection).

Code: Select all

root@af5fb16a6bfe:~# zmeventnotification.pl
07/01/20 09:33:59.933110 zmeventnotification[3374].INF [main:888] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
07/01/20 09:33:59.980240 zmeventnotification[3374].INF [main:888] [PARENT: using secrets file: /etc/zm/secrets.ini]
07/01/20 09:34:00.254513 zmeventnotification[3374].INF [main:888] [PARENT: Push enabled via FCM]
07/01/20 09:34:00.292130 zmeventnotification[3374].INF [main:888] [PARENT: MQTT Enabled]
07/01/20 09:34:00.324886 zmeventnotification[3374].INF [main:888] [PARENT: |------- Starting ES version: 5.15-Docker ---------|]
Can't ignore signal CHLD, forcing to default.
07/01/20 09:34:00.566641 zmeventnotification[3374].WAR [main:896] [PARENT: WARNING: SSL is disabled, which means all traffic will be unencrypted]
07/01/20 09:34:00.600930 zmeventnotification[3374].INF [main:888] [PARENT: Event Notification daemon v 5.15-Docker starting]
07/01/20 09:34:00.637196 zmeventnotification[3374].INF [main:888] [PARENT: Initializing MQTT connection...]
07/01/20 09:34:00.673211 zmeventnotification[3374].INF [main:888] [PARENT: Re-loading monitors]
07/01/20 09:34:00.712497 zmeventnotification[3374].INF [main:888] [PARENT: Secure WS is disabled...]
07/01/20 09:34:00.745104 zmeventnotification[3374].INF [main:888] [PARENT: Web Socket Event Server listening on port 9001]
07/01/20 09:34:20.786827 zmeventnotification[3374].INF [main:888] [PARENT: New event 30 reported for Monitor:4 (Name:Front Door) Motion Close[last processed eid:]]
07/01/20 09:34:20.857570 zmeventnotification[3429].INF [main:888] [|----> FORK:Front Door (4), eid:30 use hooks/start hook not being used, going to directly send out a notification if checks pass]
07/01/20 09:34:22.924460 zmeventnotification[3429].INF [main:888] [|----> FORK:Front Door (4), eid:30 Sending event_start notification for EID:30 over MQTT]
07/01/20 09:34:30.956183 zmeventnotification[3429].INF [main:888] [|----> FORK:Front Door (4), eid:30 Event 30 for Monitor 4 has finished]
07/01/20 09:34:32.977771 zmeventnotification[3429].INF [main:888] [|----> FORK:Front Door (4), eid:30 end hooks/use hooks not being used, going to directly send out a notification if checks pass]
07/01/20 09:34:35.029489 zmeventnotification[3429].INF [main:888] [|----> FORK:Front Door (4), eid:30 Not sending event end notification as send_event_end_notification is no]
I tried enabling mqtt and I see a topic get published but the object detection is blank:

Code: Select all

zoneminder/4 {"detection":[],"eventid":"30","state":"alarm","hookvalue":0,"monitor":"4","eventtype":"event_start","name":"Front Door:(30) Motion Close"}
I have a lot of questions and I'm not sure where to start...
SpikeyGG
Posts: 60
Joined: Mon Oct 15, 2012 12:02 am

Re: dlandon's docker zm_detect.py cannot find numpy

Post by SpikeyGG »

Ok, more detail in the logs that I hadn't noticed before. Looks like the python package wasn't able to be downloaded for some reason:

Code: Select all

Err:59 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1,
  Connection failed [IP: 91.189.88.152 80],
I tried just using my browser to navigate to this url and it downloaded the 40+MB file after a few seconds... what gives?
http://security.ubuntu.com/ubuntu/pool/ ... _amd64.deb

After that there are some pip3 errors because python wasn't installed properly. :(

Full log:

Code: Select all

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...,
*** Running /etc/my_init.d/05_set_the_time.sh...,
Setting the timezone to : America/Boise,
,
Current default time zone: 'America/Boise',
Local time is now:      Wed Jul  1 11:11:01 MDT 2020.,
Universal Time is now:  Wed Jul  1 17:11:01 UTC 2020.,
,
Date: Wed Jul  1 11:11:01 MDT 2020,
*** Running /etc/my_init.d/06_set_php_time.sh...,
*** Running /etc/my_init.d/10_syslog-ng.init...,
Jul  1 11:11:01 4cb199bf855a syslog-ng[36]: syslog-ng starting up; version='3.13.2',
*** Running /etc/my_init.d/20_apt_update.sh...,
Performing updates...,
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease,
Hit:2 http://ppa.launchpad.net/iconnor/zoneminder-1.34/ubuntu bionic InRelease,
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease,
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB],
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB],
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB],
Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse Sources [3235 B],
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [9891 B],
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted Sources [7075 B],
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [6201 B],
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe Sources [218 kB],
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [414 kB],
Get:13 http://security.ubuntu.com/ubuntu bionic-security/main Sources [199 kB],
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [9012 B],
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [372 kB],
Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [863 kB],
Get:17 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [82.2 kB],
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1403 kB],
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [101 kB],
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [13.6 kB],
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [977 kB],
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1292 kB],
Fetched 6222 kB in 11s (546 kB/s),
Reading package lists...,
Reading package lists...,
Building dependency tree...,
Reading state information...,
Calculating upgrade...,
The following packages will be upgraded:,
  curl libcurl3-gnutls libcurl4 libseccomp2 libxau6,
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.,
Need to get 634 kB of archives.,
After this operation, 1024 B of additional disk space will be used.,
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libseccomp2 amd64 2.4.3-1ubuntu3.18.04.2 [41.6 kB],
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxau6 amd64 1:1.0.8-1ubuntu1 [7556 B],
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.9 [159 kB],
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.9 [214 kB],
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.9 [212 kB],
Fetched 634 kB in 3s (253 kB/s),
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 39037 files and directories currently installed.)
,
Preparing to unpack .../libseccomp2_2.4.3-1ubuntu3.18.04.2_amd64.deb ...
,
Unpacking libseccomp2:amd64 (2.4.3-1ubuntu3.18.04.2) over (2.4.1-0ubuntu0.18.04.2) ...
,
Setting up libseccomp2:amd64 (2.4.3-1ubuntu3.18.04.2) ...
,
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 39037 files and directories currently installed.)
,
Preparing to unpack .../libxau6_1%3a1.0.8-1ubuntu1_amd64.deb ...
,
Unpacking libxau6:amd64 (1:1.0.8-1ubuntu1) over (1:1.0.8-1) ...
,
Preparing to unpack .../curl_7.58.0-2ubuntu3.9_amd64.deb ...
,
Unpacking curl (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
,
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.9_amd64.deb ...
,
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
,
Preparing to unpack .../libcurl3-gnutls_7.58.0-2ubuntu3.9_amd64.deb ...
,
Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
,
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.9) ...
,
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.9) ...
,
Setting up libxau6:amd64 (1:1.0.8-1ubuntu1) ...
,
Setting up curl (7.58.0-2ubuntu3.9) ...
,
Processing triggers for libc-bin (2.27-3ubuntu1) ...
,
Reading package lists...,
Building dependency tree...,
Reading state information...,
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.,
*** Running /etc/my_init.d/30_gen_ssl_keys.sh...,
using existing keys in "/config/keys",
*** Running /etc/my_init.d/40_firstrun.sh...,
Using existing conf folder,
Moving zm.conf to config folder,
Moving zmeventnotification.ini,
Moving secrets.ini,
Moving opencv.sh,
Moving debug_opencv.sh,
Moving the event notification server,
Moving the pushover api,
Event Server version: '5.15-Docker'.,
Using existing ssmtp folder,
Using existing mysql database folder,
Copy /config/control/ scripts to /usr/share/perl5/ZoneMinder/Control/,
Copy /config/conf/ scripts to /etc/zm/conf.d/,
Creating symbolink links,
Using existing data directory for events,
Using existing data directory for images,
Using existing data directory for temp,
Using existing data directory for cache,
no crontab for root,
Setting shared memory to : 50% of 131992296 bytes,
Installing machine learning modules & hooks...,
Reading package lists...,
Building dependency tree...,
Reading state information...,
The following additional packages will be installed:,
  binutils binutils-common binutils-x86-64-linux-gnu build-essential,
  cmake-data cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7,
  gcc-7-base gnupg gnupg-l10n gnupg-utils gpg-wks-client gpg-wks-server gpgsm,
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl,
  libasan4 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5,
  libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev,
  libisl19 libitm1 libjsoncpp1 liblocale-gettext-perl liblsan0 libmpc3 libmpx2,
  libpython3-dev libpython3.6 libpython3.6-dev libquadmath0 librhash0,
  libstdc++-7-dev libtsan0 libubsan0 libuv1 linux-libc-dev make manpages,
  manpages-dev patch python-pip-whl python3-asn1crypto python3-cffi-backend,
  python3-crypto python3-cryptography python3-dev python3-distutils,
  python3-idna python3-keyring python3-keyrings.alt python3-lib2to3,
  python3-pkg-resources python3-secretstorage python3-setuptools python3-six,
  python3-wheel python3-xdg python3.6-dev xz-utils,
Suggested packages:,
  binutils-doc cmake-doc ninja-build cpp-doc gcc-7-locales debian-keyring,
  g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib autoconf,
  automake libtool flex bison gdb gcc-doc gcc-7-multilib libgcc1-dbg,
  libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg,
  libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg,
  parcimonie xloadimage glibc-doc git bzr libstdc++-7-doc make-doc man-browser,
  ed diffutils-doc python-crypto-doc python-cryptography-doc,
  python3-cryptography-vectors gnome-keyring libkf5wallet-bin,
  gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc,
The following NEW packages will be installed:,
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cmake,
  cmake-data cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7,
  gcc-7-base gnupg gnupg-l10n gnupg-utils gpg-wks-client gpg-wks-server gpgsm,
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl,
  libasan4 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5,
  libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev,
  libisl19 libitm1 libjsoncpp1 liblocale-gettext-perl liblsan0 libmpc3 libmpx2,
  libpython3-dev libpython3.6 libpython3.6-dev libquadmath0 librhash0,
  libstdc++-7-dev libtsan0 libubsan0 libuv1 linux-libc-dev make manpages,
  manpages-dev patch python-pip-whl python3-asn1crypto python3-cffi-backend,
  python3-crypto python3-cryptography python3-dev python3-distutils,
  python3-idna python3-keyring python3-keyrings.alt python3-lib2to3,
  python3-pip python3-pkg-resources python3-secretstorage python3-setuptools,
  python3-six python3-wheel python3-xdg python3.6-dev xz-utils,
0 upgraded, 78 newly installed, 0 to remove and 0 not upgraded.,
Need to get 100.0 MB of archives.,
After this operation, 289 MB of additional disk space will be used.,
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblocale-gettext-perl amd64 1.07-3build2 [16.6 kB],
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB],
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages all 4.15-1 [1234 kB],
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.3 [196 kB],
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.3 [488 kB],
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.3 [1839 kB],
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.3 [3388 B],
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB],
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-109.110 [997 kB],
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2587 kB],
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.5.0-3ubuntu1~18.04 [18.3 kB],
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1 [551 kB],
Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB],
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp-7 amd64 7.5.0-3ubuntu1~18.04 [8591 kB],
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp amd64 4:7.4.0-1ubuntu2.3 [27.7 kB],
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcc1-0 amd64 8.4.0-1ubuntu1~18.04 [39.4 kB],
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.4.0-1ubuntu1~18.04 [27.9 kB],
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.4.0-1ubuntu1~18.04 [9192 B],
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.5.0-3ubuntu1~18.04 [358 kB],
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.4.0-1ubuntu1~18.04 [133 kB],
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.4.0-1ubuntu1~18.04 [288 kB],
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.5.0-3ubuntu1~18.04 [126 kB],
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.5.0-3ubuntu1~18.04 [42.5 kB],
Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.4.0-1ubuntu1~18.04 [11.6 kB],
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.4.0-1ubuntu1~18.04 [134 kB],
Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.5.0-3ubuntu1~18.04 [2378 kB],
Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.5.0-3ubuntu1~18.04 [9381 kB],
Get:28 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.4.0-1ubuntu2.3 [5184 B],
Get:29 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.5.0-3ubuntu1~18.04 [1471 kB],
Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.5.0-3ubuntu1~18.04 [9697 kB],
Get:31 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.4.0-1ubuntu2.3 [1568 B],
Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB],
Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdpkg-perl all 1.19.0.5ubuntu2.3 [211 kB],
Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 patch amd64 2.7.6-2ubuntu1.1 [102 kB],
Get:35 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.3 [607 kB],
Get:36 http://archive.ubuntu.com/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4758 B],
Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cmake-data all 3.10.2-1ubuntu2.18.04.1 [1332 kB],
Get:38 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjsoncpp1 amd64 1.7.4-3 [73.6 kB],
Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 librhash0 amd64 1.3.6-2 [78.1 kB],
Get:40 http://archive.ubuntu.com/ubuntu bionic/main amd64 libuv1 amd64 1.18.0-3 [64.4 kB],
Get:41 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cmake amd64 3.10.2-1ubuntu2.18.04.1 [3152 kB],
Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.9-1~18.04 [77.4 kB],
Get:43 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.9-1~18.04 [144 kB],
Get:44 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB],
Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB],
Get:46 http://archive.ubuntu.com/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB],
Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-l10n all 2.2.4-1ubuntu1.2 [49.6 kB],
Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-utils amd64 2.2.4-1ubuntu1.2 [127 kB],
Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-client amd64 2.2.4-1ubuntu1.2 [91.9 kB],
Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-server amd64 2.2.4-1ubuntu1.2 [84.9 kB],
Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgsm amd64 2.2.4-1ubuntu1.2 [215 kB],
Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg amd64 2.2.4-1ubuntu1.2 [249 kB],
Get:53 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB],
Get:54 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB],
Get:55 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB],
Get:56 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libexpat1-dev amd64 2.2.5-3ubuntu0.2 [122 kB],
Get:57 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfile-fcntllock-perl amd64 0.22-3build2 [33.2 kB],
Get:58 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.9-1~18.04ubuntu1 [1414 kB],
Ign:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1,
Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7328 B],
Get:61 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages-dev all 4.15-1 [2217 kB],
Get:62 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.1 [1653 kB],
Get:63 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-asn1crypto all 0.24.0-1 [72.8 kB],
Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-cffi-backend amd64 1.11.5-1 [64.6 kB],
Get:65 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-crypto amd64 2.6.1-8ubuntu2 [244 kB],
Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-idna all 2.6-1 [32.5 kB],
Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-six all 1.11.0-2 [11.4 kB],
Get:68 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB],
Get:69 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.9-1~18.04ubuntu1 [508 kB],
Get:70 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1288 B],
Get:71 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-secretstorage all 2.3.1-2 [12.1 kB],
Get:72 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyring all 10.6.0-1 [26.7 kB],
Get:73 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyrings.alt all 3.0-1 [16.6 kB],
Get:74 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-pip all 9.0.1-2.3~ubuntu1.18.04.1 [114 kB],
Get:75 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-pkg-resources all 39.0.1-2 [98.8 kB],
Get:76 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-setuptools all 39.0.1-2 [248 kB],
Get:77 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python3-wheel all 0.30.0-0.2 [36.5 kB],
Get:78 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-xdg all 0.25-4ubuntu1 [31.4 kB],
Err:59 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1,
  Connection failed [IP: 91.189.88.152 80],
Fetched 55.1 MB in 4min 9s (222 kB/s),
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb  Connection failed [IP: 91.189.88.152 80],
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?,
/etc/my_init.d/40_firstrun.sh: line 362: pip3: command not found,
/etc/my_init.d/40_firstrun.sh: line 363: pip3: command not found,
/etc/my_init.d/40_firstrun.sh: line 364: pip3: command not found,
Moving objectconfig.ini,
Moving zm_event_start.sh,
Moving zm_event_end.sh,
Moving zm_detect.py,
Moving zm_train_faces.py,
Hook installation completed,
Starting services...,
 * Starting MariaDB database server mysqld,
   ...done.,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[912]: Upgrading MySQL tables if necessary.,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[917]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[917]: Looking for 'mysql' as: /usr/bin/mysql,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[917]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[917]: This installation of MySQL is already upgraded to 10.1.44-MariaDB, use --force if you still need to run mysql_upgrade,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[924]: Checking for insecure root accounts.,
Jul  1 11:15:53 4cb199bf855a /etc/mysql/debian-start[929]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables,
,
Database already at version 1.34.16, update skipped.,
,
,
Freshening configuration in database,
Migratings passwords, if any...,
Loading config from DB 230 entries,
Saving config to DB 230 entries,
 * Starting Apache httpd web server apache2,
 * ,
Starting ZoneMinder:,
Jul  1 11:15:55 4cb199bf855a zmpkg[1001]: INF [Sanity checking States table...],
Jul  1 11:15:55 4cb199bf855a zmpkg[1001]: INF [Command: start],
Jul  1 11:15:58 4cb199bf855a zmdc[1013]: INF [Server starting at 20/07/01 11:15:58],
Jul  1 11:15:59 4cb199bf855a zmdc[1013]: INF [Socket should be open at /var/run/zm/zmdc.sock],
Jul  1 11:15:59 4cb199bf855a zmpkg[1001]: INF [Single server configuration detected. Starting up services.],
Jul  1 11:15:59 4cb199bf855a zmdc[1046]: INF ['zmfilter.pl --filter_id=1 --daemon' started at 20/07/01 11:15:59],
Jul  1 11:15:59 4cb199bf855a zmdc[1013]: INF ['zmfilter.pl --filter_id=1 --daemon' starting at 20/07/01 11:15:59, pid = 1046],
Jul  1 11:15:59 4cb199bf855a zmdc[1053]: INF ['zmfilter.pl --filter_id=2 --daemon' started at 20/07/01 11:15:59],
Jul  1 11:15:59 4cb199bf855a zmdc[1013]: INF ['zmfilter.pl --filter_id=2 --daemon' starting at 20/07/01 11:15:59, pid = 1053],
SpikeyGG
Posts: 60
Joined: Mon Oct 15, 2012 12:02 am

Re: dlandon's docker zm_detect.py cannot find numpy

Post by SpikeyGG »

Based on this stack overflow post, it looks like my cache has a stale entry or something. It recommends:
  1. Pass the --no-cache option to docker build, forcing every statement in the Dockerfile to be run every time the image is built.
    or
  2. Rewrite the Dockerfile to combine the apt-get commands in a single RUN instruction: RUN apt-get update && apt-get install foo bar .... This way, whenever the list of packages to install is edited, docker build will be forced to re-execute the entire RUN instruction and thus rerun apt-get update before installing.
It looks like the Dockerfile is already written to combine all the apt-get commands into a single RUN instruction so now I'm confused...
SpikeyGG
Posts: 60
Joined: Mon Oct 15, 2012 12:02 am

Re: dlandon's docker zm_detect.py cannot find numpy

Post by SpikeyGG »

OMG! I just downloaded the file manually with that machine (wget [URL]) worked great. Frustrated, I tried launching the docker run command again and this time it worked, go figure. FML.
SpikeyGG
Posts: 60
Joined: Mon Oct 15, 2012 12:02 am

Re: dlandon's docker zm_detect.py cannot find numpy

Post by SpikeyGG »

Does anyone know how to increase the apt-get timeout in dlandon's dockerfile? It seems that the apt-get functionality doesn't allow enough time for the connection to be made and the file to be downloaded. Most of the time when I spin up the docker container using "run" it fails but when I try to manually download the file with wget on my host machine it works, just takes 1:48 even though the download itself takes 32 seconds:

Code: Select all

$ time wget http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb
--2020-07-05 08:06:38--  http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.88.142, 91.189.88.152, 2001:67c:1562::15, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.88.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44867332 (43M) [application/x-debian-package]
Saving to: ‘libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb’

libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb      100%[====================================================================================================================>]  42.79M   417KB/s    in 32s

2020-07-05 08:08:26 (1.32 MB/s) - ‘libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb’ saved [44867332/44867332]


real    1m48.103s
user    0m0.113s
sys     0m0.627s
$
I found this article on askubuntu that describes a way to set the apt-get timeout value but I'm not sure how to incorporate these changes into the docker container.
Post Reply