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/db
directory and copydb.EXAMPLE.json
to it for a single API userzmuser
with 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 ofzmuser
and password ofzmpass
):mkdir /var/lib/zmeventnotification/db && python3 /mlapi/mlapi_dbuser.py -u zmuser -p zmpass -d /var/lib/zmeventnotification/db && exit
docker-compose up
in another shell/terminal/screen- Download the test video to
testvideo.mp4
python3 -mvenv venv && source venv/bin/activate && pip install opencv-python requests imutils
python3 stream.py testvideo.mp4
- this should display the test video with objects identified