-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
28 lines (26 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
28 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: '3'
services:
vision-processing:
build:
context: .
dockerfile: ${DOCKERFILE:-Dockerfile.pc}
container_name: vision-processing
restart: unless-stopped
privileged: true # Needed for camera and EdgeTPU access
volumes:
- ./:/app # Mount the entire project directory
- ${DISPLAY_VOLUME:-/tmp/.X11-unix:/tmp/.X11-unix} # For GUI display if needed (PC only)
devices:
- /dev/video0:/dev/video0 # Camera device (adjust as needed)
- ${EDGETPU_DEVICE:-/dev/bus/usb:/dev/bus/usb} # For Coral EdgeTPU (RPi only)
environment:
- DISPLAY=${DISPLAY} # For GUI display (PC only)
- TEAM_NUMBER=${TEAM_NUMBER:-0} # FRC team number
command: python main.py --config ${CONFIG_FILE:-config/pc_config.json} ${EXTRA_ARGS}
network_mode: ${NETWORK_MODE:-bridge} # Use host for RPi, bridge for PC
# Usage:
# For PC:
# DOCKERFILE=Dockerfile.pc CONFIG_FILE=config/pc_config.json docker-compose up
#
# For RPi:
# DOCKERFILE=Dockerfile.rpi CONFIG_FILE=config/rpi_config.json NETWORK_MODE=host EXTRA_ARGS="--use-cs --team 1234" DISPLAY_VOLUME="" docker-compose up