-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (91 loc) · 2.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
96 lines (91 loc) · 2.53 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
90
91
92
93
94
95
96
# DroidGrid VNF Stack — ETSI NFV-style deployment
# Each service is an independently restartable Virtual Network Function.
version: "3.9"
services:
# VNF-1: Stream Broker
vnf-ingest:
image: bluenviron/mediamtx:latest
container_name: droidgrid-ingest
network_mode: host
volumes:
- ./mediamtx.yml:/mediamtx.yml:ro
- ./recordings:/recordings
restart: unless-stopped
deploy:
resources:
limits: { cpus: "1.0", memory: "256M" }
reservations: { cpus: "0.2", memory: "64M" }
# VNF-2: Decoder / Inference Engine (Python + optional GPU)
vnf-decoder:
build:
context: .
dockerfile: src/pro/Dockerfile.decoder
container_name: droidgrid-decoder
network_mode: host
volumes:
- ./models:/models:ro
environment:
- MEDIAMTX_URL=rtsp://localhost:8554
- INFERENCE_MODEL=/models/fern_v2.onnx
- MEDIAPIPE_TASK=/models/pose_landmarker_heavy.task
command: >
python inference.py
--model /models/fern_v2.onnx
--mediapipe /models/pose_landmarker_heavy.task
--rtsp_url rtsp://localhost:8554/phone1
--n_cameras 1
--camera_id 0
--window_size 60
--confidence 0.6
--sync_offset_sec 4.0
depends_on:
- vnf-ingest
restart: on-failure
deploy:
resources:
limits: { cpus: "4.0", memory: "3G" }
reservations: { cpus: "0.1", memory: "512M" }
# VNF-3: API / Control Plane
vnf-api:
build:
context: ./src/pro
dockerfile: Dockerfile.api
container_name: droidgrid-api
ports: ["3000:3000"]
volumes:
- ~/.droidgrid:/data
- ./recordings:/recordings:ro
environment:
- DATA_DIR=/data
- MEDIAMTX_API=http://localhost:9997
- NODE_ENV=production
restart: unless-stopped
depends_on:
- vnf-ingest
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/health"]
interval: 15s
timeout: 5s
retries: 3
deploy:
resources:
limits: { cpus: "1.0", memory: "512M" }
reservations: { cpus: "0.1", memory: "128M" }
# VNF-4: Web UI
vnf-ui:
build:
context: ./src/pro
dockerfile: Dockerfile.ui
container_name: droidgrid-ui
ports: ["80:80"]
restart: unless-stopped
depends_on:
vnf-api:
condition: service_healthy
deploy:
resources:
limits: { cpus: "0.5", memory: "256M" }
reservations: { cpus: "0.05", memory: "64M" }
networks:
default:
driver: bridge