I have been unsuccessful in getting it to run with docker-compose using the sample. I get the following whether I use docker compose version 2 or 3 (it’s complaining about the environment section).
ERROR: yaml.parser.ParserError: while parsing a block mapping
in "./docker-compose.yaml", line 15, column 7
expected <block end>, but found '<scalar>'
in "./docker-compose.yaml", line 19, column 15
this is the docker compose:
version: "2"
services:
frigate_1:
container_name: tensorflow_right
restart: unless-stopped
image: frigate:latest
volumes:
- /root/frigate/label_map.pbtext:/label_map.pbtext:ro
- /root/frigate/config:/config:ro
- /lab/debug:/lab/debug:rw
ports:
- "127.0.0.1:5000:5000"
environment:
RTSP_URL: "<RTSP URL>"
REGIONS: "720,0,0,5000,1000,720RightTopMask.bmp:720,0,559,5000,1000,720RightBottomMask.bmp"
MQTT_HOST: "<IP ADDRESS OF MY HOST>"
MQTT_TOPIC_PREFIX: "cameras/1”
DEBUG: "0"
If I try to use the standard formatting for the environment section that works in my other docker-compose files, I get this:
Creating tensorflow_right ... done
tensorflow_right | Traceback (most recent call last):
tensorflow_right | File "detect_objects.py", line 247, in <module>
tensorflow_right | main()
tensorflow_right | File "detect_objects.py", line 47, in main
tensorflow_right | 'size': int(region_parts[0]),
tensorflow_right | ValueError: invalid literal for int() with base 10: '"720'
tensorflow_right exited with code 1
This is the config I used to get that:
frigate1:
container_name: tensorflow_right
restart: unless-stopped
image: frigate:latest
volumes:
- /root/frigate/label_map.pbtext:/label_map.pbtext:ro
- /root/frigate/config:/config:ro
- /lab/debug:/lab/debug:rw
ports:
- "127.0.0.1:5000:5000"
environment:
- RTSP_URL="<MY RTSP URL>"
- REGIONS="720,0,0,5000,1000,720RightTopMask.bmp:720,0,559,5000,1000,720RightBottomMask.bmp"
- MQTT_HOST="<IP OF MY HOST>"
- MQTT_TOPIC_PREFIX="cameras/1”
- DEBUG="0"
All of this works fine from the command line but not under docker-compose…
Any ideas?