-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 2.28 KB
/
docker-compose.yml
File metadata and controls
89 lines (84 loc) · 2.28 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# SPDX-FileCopyrightText: 2025 robot-visual-perception
#
# SPDX-License-Identifier: MIT
services:
orchestrator:
build:
context: ./src/backend
dockerfile: Dockerfile.orchestrator
image: robot-orchestrator:latest
container_name: robot-orchestrator
ports:
- "8002:8002"
environment:
- CORS_ORIGINS=*
networks:
- robot-net
# Note: Camera device access only works on Linux.
# On macOS/Windows, run things locally
streamer:
build:
context: ./src/backend
dockerfile: Dockerfile.streamer
image: robot-streamer:latest
container_name: robot-streamer
ports:
- "8000:8000"
environment:
- VIDEO_SOURCE_TYPE=${VIDEO_SOURCE_TYPE:-webcam} # "webcam" or "file"
- VIDEO_FILE_PATH=${VIDEO_FILE_PATH:-video.mp4} # Used when VIDEO_SOURCE_TYPE=file
- CAMERA_INDEX=0
- STUN_SERVER=stun:stun.l.google.com:19302
- CORS_ORIGINS=*
- ORCHESTRATOR_URL=http://orchestrator:8002
- STREAMER_PUBLIC_URL=http://streamer:8000
devices:
- /dev/video0:/dev/video0 # Only works on Linux (ignored for file mode)
volumes:
- ./videos:/app/videos # Mount videos directory for file mode
networks:
- robot-net
depends_on:
- orchestrator
analyzer:
build:
args:
- ONNX_RUNTIME=onnx-cpu
context: ./src/backend
dockerfile: Dockerfile.analyzer
image: robot-analyzer:latest
container_name: robot-analyzer
ports:
- "8001:8001"
environment:
- STREAMER_OFFER_URL=http://streamer:8000/offer
- MODEL_PATH=models/yolo11n.pt
- STUN_SERVER=stun:stun.l.google.com:19302
- CORS_ORIGINS=*
- ORCHESTRATOR_URL=http://orchestrator:8002
- ANALYZER_PUBLIC_URL=http://analyzer:8001
volumes:
- ./src/backend/models:/app/models
depends_on:
- orchestrator
- streamer
networks:
- robot-net
frontend:
build:
context: ./src/frontend
dockerfile: Dockerfile
args:
- VITE_BACKEND_URL=http://localhost:8001
- VITE_ORCHESTRATOR_URL=http://localhost:8002
image: robot-frontend:latest
container_name: robot-frontend
ports:
- "8080:80"
depends_on:
- analyzer
networks:
- robot-net
networks:
robot-net:
driver: bridge