-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathcompose.yml
More file actions
263 lines (261 loc) · 8.8 KB
/
compose.yml
File metadata and controls
263 lines (261 loc) · 8.8 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
258
259
260
261
262
263
services:
milvus-db:
image: docker.io/milvusdb/milvus:v2.5.15
container_name: ibvs-milvusdb
security_opt:
- seccomp:unconfined
environment:
- ETCD_USE_EMBED=true
- ETCD_DATA_DIR=/var/lib/milvus/etcd
- ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml
- COMMON_STORAGETYPE=local
- HTTP_PROXY=
- HTTPS_PROXY=
- NO_PROXY=
- http_proxy=
- https_proxy=
- no_proxy=
volumes:
- milvus-data:/var/lib/milvus
- ./src/milvus-db/embedEtcd.yaml:/milvus/configs/embedEtcd.yaml
- ./src/milvus-db/user.yaml:/milvus/configs/user.yaml
# This port conflicts with etcd when exposed, so it is commented out:
# - "2379:2379"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
timeout: 20s
retries: 3
start_period: 90s
command: ["milvus", "run", "standalone"]
restart: on-failure:5
milvus-ui:
image: docker.io/zilliz/attu:v2.4
container_name: ibvs-milvusui
environment:
- MILVUS_URL=milvus-db:19530
- HTTP_PROXY=
- HTTPS_PROXY=
- NO_PROXY=
- http_proxy=
- https_proxy=
- no_proxy=
restart: on-failure:5
depends_on:
milvus-db:
condition: service_healthy
feature-matching:
image: ${DOCKER_REGISTRY}intel/feature-matching:v1.2.0
container_name: ibvs-featurematching
build:
context: src/feature-matching
dockerfile: Dockerfile
read_only: true
environment:
MILVUS_ENDPOINT: http://milvus-db:19530
COLLECTION_NAME: my_image_collection
MODEL_DIM: 1000
MQTT_BROKER: ibvs-broker
MQTT_PORT: 1883
MQTT_TOPIC: edge_video_analytics_results
CONFIDENCE_THRESHOLD: 0.4
HTTP_PROXY: ""
HTTPS_PROXY: ""
NO_PROXY: ""
http_proxy: ""
https_proxy: ""
no_proxy: ""
depends_on:
milvus-db:
condition: service_healthy
broker:
condition: service_started
volumes:
- image-data:/usr/src/app/static:rw
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
restart: on-failure:5
streaming-pipeline:
image: ${DOCKER_REGISTRY}intel/streaming-pipeline:v1.2.0
build:
context: src/streaming-pipeline
dockerfile: Dockerfile
container_name: ibvs-streaming
environment:
https_proxy: "${https_proxy}"
http_proxy: "${http_proxy}"
no_proxy: "${no_proxy}"
command: >
bash -c "
wget -O file.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 && \
unset http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY && \
gst-launch-1.0 filesrc location=file.mp4 ! qtdemux name=mdemux ! h264parse ! video/x-h264,stream-format=byte-stream ! mpegtsmux name=mux ! filesink location=file.ts && \
gst-launch-1.0 multifilesrc location=file.ts loop=true ! tsdemux ! h264parse ! rtspclientsink protocols=tcp location=rtsp://rtsp-server:8554/stream
"
depends_on:
rtsp-server:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "ffprobe -v error -rtsp_transport tcp rtsp://ibvs-mediamtx:8554/stream -show_streams || exit 1"]
interval: 30s
timeout: 10s
retries: 3
restart: on-failure:5
rtsp-server:
image: docker.io/bluenviron/mediamtx:1.10.0
container_name: ibvs-mediamtx
environment:
- MTX_PROTOCOLS=tcp
- MTX_WEBRTCADDITIONALHOSTS=127.0.0.1
- HTTP_PROXY=
- HTTPS_PROXY=
- NO_PROXY=
- http_proxy=
- https_proxy=
- no_proxy=
restart: on-failure:5
broker:
image: docker.io/library/eclipse-mosquitto:2.0.20
container_name: ibvs-broker
volumes:
- ./src/broker:/mosquitto/config
restart: unless-stopped
healthcheck:
test: ["CMD", "mosquitto_sub", "-t", "$$SYS/#", "-C", "1", "-i", "healthcheck", "-W", "3"]
interval: 30s
timeout: 10s
retries: 3
dlstreamer-pipeline-server:
image: ${DLSTREAMER_PIPELINE_SERVER_IMAGE}
hostname: dlstreamer-pipeline-server
container_name: ibvs-dlstreamer-pipeline-server
read_only: true
security_opt:
- no-new-privileges
privileged: false
tty: true
entrypoint: ["./run.sh"]
# - '8554:8554'
environment:
- NO_PROXY=${no_proxy},ibvs-mediamtx,rtsp-server,localhost,127.0.0.1,10.244.0.0/16,172.18.0.0/16
- no_proxy=${no_proxy},ibvs-mediamtx,rtsp-server,localhost,127.0.0.1,10.244.0.0/16,172.18.0.0/16
- ENABLE_RTSP=true
- RTSP_PORT=8554
- ENABLE_WEBRTC=true
- WEBRTC_SIGNALING_SERVER=ws://localhost:8443
- RUN_MODE=EVA
- GENICAM=Balluff
- GST_DEBUG="1,gencamsrc:2"
# Default Detection and Classification Device
- DETECTION_DEVICE=CPU
- CLASSIFICATION_DEVICE=CPU
- ADD_UTCTIME_TO_METADATA=true
- LSFEATURE_NAME="dlstreamer-pipeline-server"
# - RUNTIME_LICENSE_CHECK_FREQ_SECS=${RUNTIME_LICENSE_CHECK_FREQ_SECS}
# - APPLICATION_RESTART_FREQ_SECS=${APPLICATION_RESTART_FREQ_SECS}
- HTTPS=false # Make it "true" to enable SSL/TLS secure mode, mount the generated certificates
- MTLS_VERIFICATION=false # if HTTPS=true, enable/disable client certificate verification for mTLS
# Model Registry Microservice
# - MR_VERIFY_CERT=${MR_VERIFY_CERT}
# - MR_USER_PASSWORD=${MR_USER_PASSWORD}
# Append pipeline name to a publisher topic
- APPEND_PIPELINE_NAME_TO_PUBLISHER_TOPIC=false
- REST_SERVER_PORT=8080
- MQTT_HOST=ibvs-broker
- MQTT_PORT=1883
# NPU related environment variables
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
volumes:
- "./src/dlstreamer-pipeline-server/configs/filter-pipeline/config.cpu.json:/home/pipeline-server/config.json"
# - "./src/dlstreamer-pipeline-server/configs/filter-pipeline/config.gpu.json:/home/pipeline-server/config.json"
# - "./src/dlstreamer-pipeline-server/configs/filter-pipeline/config.npu.json:/home/pipeline-server/config.json"
- "dlstreamer-pipeline-server-pipeline-root:/var/cache/pipeline_root:uid=1999,gid=1999"
# - "../certificates:/MqttCerts:ro"
# - "../Certificates/ssl_server/:/run/secrets/EdgeVideoAnalyticsMicroservice_Server:ro"
# - "../Certificates/model_registry/:/run/secrets/ModelRegistry_Server:ro"
- "/run/udev:/run/udev:ro"
- "/dev:/dev"
- dlstreamer-pipeline-server-tmp:/tmp
# - "../mr_models:/home/pipeline-server/mr_models:rw"
- "./src/dlstreamer-pipeline-server/models/public:/models/public"
- "./src/dlstreamer-pipeline-server/models/resnet-50-pytorch:/models/resnet-50-pytorch"
group_add:
# render group ID for ubuntu 20.04 host OS
- "109"
# render group ID for ubuntu 22.04 host OS
- "110"
# render group ID for ubuntu 24.04 host OS
- "992"
device_cgroup_rules:
- 'c 189:* rmw'
- 'c 209:* rmw'
- 'a 189:* rwm'
devices:
- "/dev:/dev"
depends_on:
broker:
condition: service_started
restart: on-failure:5
app:
image: ${DOCKER_REGISTRY}intel/image-based-video-search:v1.2.0
container_name: ibvs-app
build:
context: src/app
dockerfile: Dockerfile
read_only: true
depends_on:
streaming-pipeline:
condition: service_healthy
feature-matching:
condition: service_healthy
dlstreamer-pipeline-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
restart: on-failure:5
nginx:
image: nginx:1.27-alpine
container_name: ibvs-reverse-proxy
ports:
- "80:80"
- "443:443"
- "8554:8554"
volumes:
- ./src/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./src/nginx/generate_certs.sh:/usr/local/bin/generate_certs.sh:ro
entrypoint: ["/usr/local/bin/generate_certs.sh"]
depends_on:
- app
environment:
- http_proxy=
- https_proxy=
- no_proxy=
- NO_PROXY=
restart: on-failure:5
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/nginx_healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
milvus-data:
image-data:
dlstreamer-pipeline-server-pipeline-root:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
dlstreamer-pipeline-server-tmp:
driver: local
driver_opts:
type: tmpfs
device: tmpfs