-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstack.yml
More file actions
258 lines (248 loc) · 6.58 KB
/
stack.yml
File metadata and controls
258 lines (248 loc) · 6.58 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
version: "3.8"
networks:
hub:
name: vision-hub-net
external: true
services:
mediamtx:
image: bluenviron/mediamtx:latest
volumes:
- /srv/vision-hub/mediamtx.yml:/mediamtx.yml:ro
networks:
hub:
aliases: [mediamtx]
ports:
- target: 8554
published: 8554
protocol: tcp # RTSP
- target: 8889
published: 8889
protocol: tcp # WHEP/WHIP HTTP
- target: 8189
published: 8189
protocol: udp # WebRTC (UN SEUL port en 1.15.3)
- target: 8189
published: 8189
protocol: tcp # WebRTC TCP (TEMP while debugging)
deploy:
placement:
constraints:
- node.labels.role == frontend
init: true
ui-astro:
image: ui-astro:local
networks:
hub:
aliases: [ui-astro]
ports:
- target: 4321
published: 4321
protocol: tcp
deploy:
placement:
constraints:
- node.labels.role == frontend
restart_policy:
condition: any
update_config:
order: start-first
parallelism: 1
delay: 2s
init: true
price-api:
image: vision-hub/price-api:latest
networks:
hub:
aliases: [price-api]
environment:
- TZ=Europe/Stockholm
- MODEL_DIR=/app/model
- ALLOW_ORIGINS=http://localhost:4321,http://127.0.0.1:4321,http://192.168.10.2:4321,http://ui-astro:4321,http://api:8090
ports:
- target: 8080
published: 8080
protocol: tcp
volumes:
- /srv/vision-hub/model:/app/model:ro
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8080/healthz"]
interval: 10s
timeout: 3s
retries: 10
start_period: 5s
deploy:
placement:
constraints:
- node.labels.gpu == true
restart_policy:
condition: any
update_config:
order: start-first
parallelism: 1
delay: 2s
init: true
api:
image: api:local
networks: [hub]
environment:
- ORCH_TOKEN=${ORCH_TOKEN:-dev-token}
- ALLOW_ORIGINS=http://localhost:4321,http://127.0.0.1:4321,http://192.168.10.2:4321
- STACK_NAME=vision-hub
- PUBLIC_BASE=http://192.168.10.2:4321
- IDLE_SECONDS=${IDLE_SECONDS:-120}
- DOCKER_HOST=unix:///var/run/docker.sock
- CONSENT_SECRET=${CONSENT_SECRET}
- CONSENT_TTL_SECONDS=${CONSENT_TTL_SECONDS:-600}
- CONSENT_AUD=${CONSENT_AUD}
- CAPTURE_NAME=vision-hub-capture
- CAPTURE_IDLE_GRACE=180
- CAPTURE_MIN_DOWN=20
- CAPTURE_MIN_UP=60
- CAPTURE_STARTUP_SETTLE=3
ports:
- target: 8090
published: 8090
protocol: tcp
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints:
- node.labels.role == frontend
- node.role == manager
restart_policy:
condition: any
update_config:
order: start-first
parallelism: 1
delay: 2s
init: true
yolo:
image: yolo:local
networks:
hub:
aliases: [yolo]
environment:
- CAMERA=${CAMERA_URL:-rtsp://mediamtx:8554/cam}
- OPENCV_FFMPEG_CAPTURE_OPTIONS=rtsp_transport;udp|fflags;nobuffer|flush_packets;1|reorder_queue_size;0|max_delay;0|probesize;32000|analyzeduration;0|stimeout;2000000
- IMG_SIZE=${IMG_SIZE:-640}
- DRAW_LABELS=1
- MODEL=${MODEL:-yolov8n.pt}
- NVIDIA_VISIBLE_DEVICES=MIG-926c23ec-8b06-5190-9939-e8e45358a0bb
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
ports:
- target: 6000
published: 6002
protocol: tcp
deploy:
placement:
constraints:
- node.labels.gpu == true
restart_policy:
condition: any
update_config:
order: start-first
parallelism: 1
delay: 2s
init: true
pose:
image: pose:local
networks:
hub:
aliases: [pose]
environment:
- CAMERA=${CAMERA_URL:-rtsp://mediamtx:8554/cam}
- OPENCV_FFMPEG_CAPTURE_OPTIONS=rtsp_transport;udp|fflags;nobuffer|flush_packets;1|reorder_queue_size;0|max_delay;0|probesize;32000|analyzeduration;0|stimeout;2000000
- MODEL=${MODEL_POSE:-yolov8n-pose.pt}
- IMG_SIZE=${IMG_SIZE:-640}
- ANNOT_URL=rtsp://mediamtx:8554/pose_annot
- RTSP_TRANSPORT=udp
- DRAW_ON_VIDEO=1
- KP_THR=0.25
- NVIDIA_VISIBLE_DEVICES=MIG-926c23ec-8b06-5190-9939-e8e45358a0bb
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
ports:
- target: 6000
published: 6001
protocol: tcp
deploy:
placement:
constraints:
- node.labels.gpu == true
restart_policy:
condition: any
update_config:
order: start-first
parallelism: 1
delay: 2s
init: true
chang-demo:
image: chang-demo:local
networks:
hub:
aliases: [chang-demo]
environment:
- CAMERA_RTSP=rtsp://192.168.10.2:8554/cam
- OUTPUT_RTSP=rtsp://192.168.10.2:8554/chang_annot
- UIMAIN_OUTPUT_PORT=12346
- HEALTH_PORT=7000
- NVIDIA_VISIBLE_DEVICES=MIG-926c23ec-8b06-5190-9939-e8e45358a0bb
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
ports:
- target: 7000
published: 7000
deploy:
placement:
constraints:
- node.labels.gpu == true
restart_policy:
condition: any
delay: 10s
max_attempts: 3
update_config:
order: start-first
parallelism: 1
delay: 2s
# 👇 avoid log files going infinite
labels: {}
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
init: true
chang-demo_ctw-11n-swin:
image: chang-demo_ctw-11n-swin:local
networks:
hub:
aliases: [chang-demo_ctw-11n-swin]
environment:
- CAMERA_RTSP=rtsp://192.168.10.2:8554/cam
- OUTPUT_RTSP=rtsp://192.168.10.2:8554/chang_annot_ctw-11n-swin
- UIMAIN_OUTPUT_PORT=12346
- HEALTH_PORT=7001
- NVIDIA_VISIBLE_DEVICES=MIG-926c23ec-8b06-5190-9939-e8e45358a0bb
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
ports:
- target: 7001
published: 7001
deploy:
placement:
constraints:
- node.labels.gpu == true
restart_policy:
condition: any
delay: 10s
max_attempts: 3
update_config:
order: start-first
parallelism: 1
delay: 2s
# 👇 avoid log files going infinite
labels: {}
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
init: true