forked from open-edge-platform/edge-ai-suites
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
231 lines (224 loc) · 7.3 KB
/
docker-compose.yml
File metadata and controls
231 lines (224 loc) · 7.3 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
services:
dlstreamer-pipeline-server:
depends_on:
model_registry:
condition: service_healthy
image: ${DOCKER_REGISTRY}intel/dlstreamer-pipeline-server:3.0.0
container_name: dlstreamer-pipeline-server
hostname: dlstreamer-pipeline-server
networks:
- mraas
restart: unless-stopped
security_opt:
- no-new-privileges
ports:
- '8080:8080'
- '8554:8554'
environment:
AppName: "DLStreamerPipelineServer"
ENABLE_WEBRTC: true
WEBRTC_SIGNALING_SERVER: http://${HOST_IP}:${WHIP_SERVER_PORT}
ENABLE_RTSP: false
no_proxy: ${no_proxy},${HOST_IP},${RTSP_CAMERA_IP},otel-collector
READ_CONFIG_FROM_FILE_ENV: ${READ_CONFIG_FROM_FILE_ENV}
RUN_MODE: "EVA"
GST_DEBUG: "1"
APPEND_PIPELINE_NAME_TO_PUBLISHER_TOPIC: "true"
REST_SERVER_PORT: 8080
S3_STORAGE_HOST: ${HOST_IP}
S3_STORAGE_PORT: ${MR_MINIO_SERVER_PORT}
S3_STORAGE_USER: ${MR_MINIO_ACCESS_KEY}
S3_STORAGE_PASS: ${MR_MINIO_SECRET_KEY}
SERVICE_NAME: "dlstreamer-pipeline-server"
ENABLE_OPEN_TELEMETRY: true
OTEL_COLLECTOR_HOST: ${OTEL_COLLECTOR_HOST}
OTEL_COLLECTOR_PORT: ${OTEL_COLLECTOR_PORT}
OTEL_EXPORT_INTERVAL_MILLIS: ${OTEL_EXPORT_INTERVAL_MILLIS}
volumes:
- vol_pipeline_root:/var/cache/pipeline_root:uid=1999,gid=1999
- /var/tmp:/var/tmp
- ./resources/:/home/pipeline-server/resources/
- ./configs/config.json:/home/pipeline-server/config.json
# Following devices under /dev filesystem will be needed based on usecase
# dri - GPU
# USB camera devices
# Selective mount can be done for deployment as mounting whole /dev is not recommended
- "/dev:/dev"
- "/tmp:/tmp"
# volume mount the udev database with read-only permission,so the USB3 Vision interfaces can be enumerated correctly in the container
- "/run/udev:/run/udev:ro"
# Volume mount the directory in host system where the images are stored onto the container directory system.
# - <absolute or relative path to the images directory>:/app/img_dir
#- ../DLStreamerPipelineServer/udfs:/home/pipeline-server/udfs/
group_add:
# render group ID for ubuntu 20.04 host OS
- "109"
# render group ID for ubuntu 22.04 host OS
- "110"
device_cgroup_rules:
# Default run - device-cgroup-rule='c 189:* rmw'
# Selective rules can be applied for deployment
- 'c 189:* rmw'
- 'c 209:* rmw'
- 'a 189:* rwm'
devices:
# Following devices under /dev filesystem will be needed based on usecase
# dri - GPU
# USB camera devices
# Selective mount can be done for deployment as mounting whole /dev is not recommended
- "/dev:/dev"
mediamtx:
image: bluenviron/mediamtx:1.11.3
container_name: mediamtx-server
environment:
- MTX_LOGLEVEL=debug
- MTX_RTSP=no
- MTX_RTMP=no
- MTX_HLS=no
- MTX_SRT=no
- MTX_WEBRTCICESERVERS2_0_URL=turn:${HOST_IP}:${COTURN_UDP_PORT}
- MTX_WEBRTCICESERVERS2_0_USERNAME=${MTX_WEBRTCICESERVERS2_0_USERNAME}
- MTX_WEBRTCICESERVERS2_0_PASSWORD=${MTX_WEBRTCICESERVERS2_0_PASSWORD}
ports:
- "${WHIP_SERVER_PORT}:8889"
- "8189:8189"
- "9997:9997"
networks:
- mraas
coturn:
image: coturn/coturn:latest
container_name: coturn
ports:
- "${COTURN_UDP_PORT}:3478"
- "${COTURN_UDP_PORT}:3478/udp"
command: ["-v"] # Verbose mode for logging
networks:
- mraas
model_registry:
image: ${DOCKER_REGISTRY}intel/model-registry:1.0.3
container_name: model_registry
hostname: model_registry
ipc: "none"
ports:
- "${HOST_IP}:32002:${MR_SERVER_PORT}"
restart: unless-stopped
deploy:
resources:
limits:
memory: 4096mb
cpus: '0.30'
pids: 200
reservations:
memory: 2048mb
cpus: '0.15'
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
environment:
AppName: "ModelRegistry"
MIN_LOG_LEVEL: ${MR_MIN_LOG_LEVEL}
ENABLE_HTTPS_MODE: ${ENABLE_HTTPS_MODE}
MLFLOW_TRACKING_URI: postgresql+psycopg2://${POSTGRES_USER}:${MR_PSQL_PASSWORD}@mraas_postgres:${MR_PSQL_PORT}/${MR_PSQL_DATABASE}
MLFLOW_S3_ENDPOINT_URL: ${MR_MLFLOW_S3_ENDPOINT_URL}
MINIO_HOSTNAME: ${MR_MINIO_HOSTNAME}
MINIO_SERVER_PORT: ${MR_MINIO_SERVER_PORT}
MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY}
MINIO_BUCKET_NAME: ${MR_MINIO_BUCKET_NAME}
SERVER_PORT: ${MR_SERVER_PORT}
LSHOST: host.docker.internal
SERVER_CERT: /run/secrets/ModelRegistry_Server/public.crt
CA_CERT: /run/secrets/ModelRegistry_Server/server-ca.crt
SERVER_PRIVATE_KEY: /run/secrets/ModelRegistry_Server/private.key
no_proxy: mraas_minio
NO_PROXY: mraas_minio
volumes:
- ./Certificates/ssl/:/run/secrets/ModelRegistry_Server:ro
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- mraas
mraas_postgres:
image: postgres:13
container_name: mraas_postgres
hostname: mraas_postgres
restart: unless-stopped
security_opt:
- no-new-privileges
environment:
AppName: "ModelRegistry"
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${MR_PSQL_PASSWORD}
POSTGRES_DB: ${MR_PSQL_DATABASE}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- mr_postgres_data:/var/lib/postgresql/data
expose:
- ${MR_PSQL_PORT}
networks:
- mraas
mraas_minio:
image: minio/minio:RELEASE.2020-12-12T08-39-07Z
container_name: mraas_minio
hostname: mraas_minio
ipc: "none"
expose:
- ${MR_MINIO_SERVER_PORT}
volumes:
- ./Certificates/ssl/:/certs/:rw
- "vol_minio_data:/data"
networks:
- mraas
restart: unless-stopped
security_opt:
- no-new-privileges
ports:
- '8000:8000'
environment:
AppName: "ModelRegistry"
MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY}
ENABLE_HTTPS_MODE: ${ENABLE_HTTPS_MODE}
command: server --address ":8000" --certs-dir /certs /data
prometheus:
image: prom/prometheus:latest
container_name: prometheus
environment:
- HTTP_PROXY=${http_proxy}
- HTTPS_PROXY=${https_proxy}
- NO_PROXY=$no_proxy,otel-collector,localhost,127.0.0.1
ports:
- "${PROMETHEUS_PORT}:9090"
volumes:
- ./configs/open_telemetry/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- mraas
otel-collector:
image: otel/opentelemetry-collector-contrib:0.94.0
container_name: otel-collector
environment:
HTTP_PROXY: ${http_proxy}
HTTPS_PROXY: ${https_proxy}
NO_PROXY: $no_proxy,prometheus,dlstreamer-pipeline-server,localhost,127.0.0.1
ports:
- "4317:4317" # OTLP gRPC receiver (default for metrics)
- "4318:4318" # Prometheus scrape target
volumes:
- ./configs/open_telemetry/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml # OpenTelemetry Collector config
restart: always
networks:
- mraas
networks:
mraas:
driver: bridge
volumes:
vol_pipeline_root:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
vol_minio_data:
driver: local
mr_postgres_data:
driver: local