Skip to content

Commit cea5a69

Browse files
GHI-1891 & ITEP-87877 : Fixed both issues (#1958)
1 parent e811ad9 commit cea5a69

File tree

4 files changed

+79
-15
lines changed

4 files changed

+79
-15
lines changed

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
.PHONY: init-mdpnp build-mdpnp build-dds-bridge run down download-rppg-assets
66

7+
HTTP_PROXY := $(or $(HTTP_PROXY),$(http_proxy))
8+
HTTPS_PROXY := $(or $(HTTPS_PROXY),$(https_proxy))
9+
NO_PROXY := $(or $(NO_PROXY),$(no_proxy))
10+
export HTTP_PROXY
11+
export HTTPS_PROXY
12+
export NO_PROXY
13+
714
MDPNP_PATH := services/mdpnp/mdpnp
815
DDS_BRIDGE_PATH := services/dds-bridge
916
DOCKER_COMPOSE := docker-compose.yaml
@@ -32,10 +39,10 @@ run:
3239
@if [ "$(REGISTRY)" = "true" ]; then \
3340
echo "##############Using registry mode - fetching all images..."; \
3441
echo "Using HOST_IP=$(HOST_IP) for UI backend"; \
35-
docker compose -f $(DOCKER_COMPOSE) --env-file configs/device.env up -d; \
42+
./run_compose.sh -d; \
3643
else \
3744
echo "Using HOST_IP=$(HOST_IP) for UI backend"; \
38-
docker compose -f $(DOCKER_COMPOSE) --env-file configs/device.env up --build -d; \
45+
./run_compose.sh --build -d; \
3946
fi
4047
@echo "==============================================="
4148
@echo "Multi-modal patient monitoring application is starting up."

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/docker-compose.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ services:
1313
NO_PROXY: ${NO_PROXY}
1414
image: intel/hl-ai-patient-monitoring-assets:${TAG:-1.0.1}
1515
container_name: patient-monitoring-assets
16+
environment:
17+
- MODEL_CONFIG_PATH=/app/configs/model-config.yaml
18+
- HTTP_PROXY=${HTTP_PROXY}
19+
- HTTPS_PROXY=${HTTPS_PROXY}
20+
- NO_PROXY=${NO_PROXY}
1621
volumes:
1722
- ./configs/model-config.yaml:/app/configs/model-config.yaml:ro
1823
- ./models:/models
@@ -121,15 +126,13 @@ services:
121126
condition: service_started
122127
environment:
123128
- ECG_DEVICE=${ECG_DEVICE}
124-
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
125129
env_file:
126130
- ./configs/device.env
127131
volumes:
128132
- ./models:/models
129133
- ./videos:/videos
130134
devices:
131135
- "/dev/dri:/dev/dri"
132-
- "/dev/accel/accel0:/dev/accel/accel0"
133136
group_add:
134137
- video
135138

@@ -154,7 +157,6 @@ services:
154157
- DEPLOYMENT_ENV=production
155158
- POSE_3D_DEVICE=${POSE_3D_DEVICE:-GPU}
156159
- CONTROL_PORT=8083
157-
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
158160
env_file:
159161
- ./configs/device.env
160162
depends_on:
@@ -167,7 +169,6 @@ services:
167169
- ./videos:/videos
168170
devices:
169171
- "/dev/dri:/dev/dri"
170-
- "/dev/accel/accel0:/dev/accel/accel0"
171172
group_add:
172173
- video
173174

@@ -189,15 +190,13 @@ services:
189190
condition: service_started
190191
environment:
191192
- RPPG_DEVICE=${RPPG_DEVICE}
192-
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
193193
env_file:
194194
- ./configs/device.env
195195
volumes:
196196
- ./models:/models
197197
- ./videos:/videos
198198
devices:
199199
- "/dev/dri:/dev/dri"
200-
- "/dev/accel/accel0:/dev/accel/accel0"
201200
group_add:
202201
- video
203202

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
6+
if [[ ! -f "${ROOT_DIR}/configs/device.env" ]]; then
7+
echo "configs/device.env not found; running without NPU override" >&2
8+
exec docker compose -f "${ROOT_DIR}/docker-compose.yaml" up "$@"
9+
fi
10+
11+
source "${ROOT_DIR}/configs/device.env"
12+
13+
TMP_OVERRIDE="$(mktemp)"
14+
trap 'rm -f "${TMP_OVERRIDE}"' EXIT
15+
16+
echo "services:" > "${TMP_OVERRIDE}"
17+
18+
HAS_NPU=false
19+
20+
if [[ "${ECG_DEVICE:-}" == "NPU" ]]; then
21+
HAS_NPU=true
22+
cat >> "${TMP_OVERRIDE}" <<EOF
23+
ai-ecg:
24+
environment:
25+
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
26+
devices:
27+
- "/dev/dri:/dev/dri"
28+
- "/dev/accel/accel0:/dev/accel/accel0"
29+
EOF
30+
fi
31+
32+
if [[ "${POSE_3D_DEVICE:-}" == "NPU" ]]; then
33+
HAS_NPU=true
34+
cat >> "${TMP_OVERRIDE}" <<EOF
35+
3dpose-estimation:
36+
environment:
37+
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
38+
devices:
39+
- "/dev/dri:/dev/dri"
40+
- "/dev/accel/accel0:/dev/accel/accel0"
41+
EOF
42+
fi
43+
44+
if [[ "${RPPG_DEVICE:-}" == "NPU" ]]; then
45+
HAS_NPU=true
46+
cat >> "${TMP_OVERRIDE}" <<EOF
47+
rppg:
48+
environment:
49+
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
50+
devices:
51+
- "/dev/dri:/dev/dri"
52+
- "/dev/accel/accel0:/dev/accel/accel0"
53+
EOF
54+
fi
55+
56+
if [[ "${HAS_NPU}" == true ]]; then
57+
echo "Detected NPU devices in configs/device.env; using runtime override ${TMP_OVERRIDE}" >&2
58+
exec docker compose --env-file "${ROOT_DIR}/configs/device.env" -f "${ROOT_DIR}/docker-compose.yaml" -f "${TMP_OVERRIDE}" up "$@"
59+
else
60+
echo "No NPU devices configured in configs/device.env; running without NPU override" >&2
61+
exec docker compose --env-file "${ROOT_DIR}/configs/device.env" -f "${ROOT_DIR}/docker-compose.yaml" up "$@"
62+
fi
63+

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/services/metrics-collector/Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
FROM intel/retail-benchmark:3.3.1
1+
FROM intel/retail-benchmark:3.3.2
22

33
ARG HTTP_PROXY
44

5-
# Optional: Set APT proxy if provided at build time
6-
RUN if [ -n "$HTTP_PROXY" ]; then \
7-
echo "Acquire::http::Proxy \"$HTTP_PROXY\";" > /etc/apt/apt.conf; \
8-
fi
9-
105
WORKDIR /app
116

127
# Ensure Python runtime is available for the API
@@ -22,4 +17,4 @@ EXPOSE 9001
2217

2318
# Run the existing metrics collectors (via supervisord in the base image)
2419
# and the FastAPI app in a single container.
25-
CMD ["/start.sh"]
20+
CMD ["/start.sh"]

0 commit comments

Comments
 (0)