Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.15 KB

readme.md

File metadata and controls

36 lines (27 loc) · 1.15 KB

Docker container version of https://github.com/ZoneMinder/mlapi

docker pull rossbuggins/mlapi

https://hub.docker.com/r/rossbuggins/mlapi

Info

  • Manual build of python 3.8
  • Manual build of opencv and dlib
  • Yolo fix

Notes

  • opencv build config is for CPU, GPU support not enabled
  • no multistage build, all source etc still in final image

Config

  1. Update config/secrets.ini
  2. Optional set api user and password in .env
docker-compose up
curl -H "Content-Type:application/json" -XPOST -d '{"username":"makeupauser", "password":"makeupapassword"}'
curl --location --request POST 'http://localhost:5000/api/v1/detect/object' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NzY0NzEwODEsIm5iZiI6MTY3NjQ3MTA4MSwianRpIjoiMDhkNGM3ZmYtOWY4OC00NDg0LTk4NDgtNmZlMjAxNzliNWUyIiwiZXhwIjoxNjc2NDc0NjgxLCJpZGVudGl0eSI6Im1ha2V1cGF1c2VyIiwiZnJlc2giOmZhbHNlLCJ0eXBlIjoiYWNjZXNzIn0.g5-oOimpf4mJ2Q91QwOkeOTqqHdzdaIpvuS4XnnNsbY' \
--header 'Content-Type: application/json' \
--data-raw '{"url":"https://images.pexels.com/photos/4148842/pexels-photo-4148842.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"}'