A proper and uncomplicated Docker container for https://github.com/ZoneMinder/mlapi
IMPORTANT: This is a personal project only. PRs are accepted, but this is not supported and "issues" will likely not be fixed or responded to. This is only for people who understand the details of everything invovled.
You must mount a data path in to the container at /var/lib/zmeventnotification and that path must already have a writable images directory in it.
The docker-compose file and mlapiconfig.EXAMPLE.ini should provide a sane configuration for initial testing of the container, e.g.:
- Set up an API username and password; you can either create the
data/dbdirectory and copydb.EXAMPLE.jsonto it for a single API userzmuserwith passwordzmpass, or create your own user with something like:docker run -it --rm -v ./data:/var/lib/zmeventnotification --entrypoint /bin/bash jantman/docker-zm-mlapi:<TAG>and then (assuming a username ofzmuserand password ofzmpass):mkdir /var/lib/zmeventnotification/db && python3 /mlapi/mlapi_dbuser.py -u zmuser -p zmpass -d /var/lib/zmeventnotification/db && exit docker-compose upin another shell/terminal/screen- Download the test video to
testvideo.mp4 python3 -mvenv venv && source venv/bin/activate && pip install opencv-python requests imutilspython3 stream.py testvideo.mp4- this should display the test video with objects identified