Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

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

HTTP_PROXY := $(or $(HTTP_PROXY),$(http_proxy))
HTTPS_PROXY := $(or $(HTTPS_PROXY),$(https_proxy))
NO_PROXY := $(or $(NO_PROXY),$(no_proxy))
export HTTP_PROXY
export HTTPS_PROXY
export NO_PROXY

MDPNP_PATH := services/mdpnp/mdpnp
DDS_BRIDGE_PATH := services/dds-bridge
DOCKER_COMPOSE := docker-compose.yaml
Expand Down Expand Up @@ -32,10 +39,10 @@ run:
@if [ "$(REGISTRY)" = "true" ]; then \
echo "##############Using registry mode - fetching all images..."; \
echo "Using HOST_IP=$(HOST_IP) for UI backend"; \
docker compose -f $(DOCKER_COMPOSE) --env-file configs/device.env up -d; \
./run_compose.sh -d; \
else \
echo "Using HOST_IP=$(HOST_IP) for UI backend"; \
docker compose -f $(DOCKER_COMPOSE) --env-file configs/device.env up --build -d; \
./run_compose.sh --build -d; \
fi
@echo "==============================================="
@echo "Multi-modal patient monitoring application is starting up."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ services:
NO_PROXY: ${NO_PROXY}
image: intel/hl-ai-patient-monitoring-assets:${TAG:-1.0.1}
container_name: patient-monitoring-assets
environment:
- MODEL_CONFIG_PATH=/app/configs/model-config.yaml
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
- NO_PROXY=${NO_PROXY}
volumes:
- ./configs/model-config.yaml:/app/configs/model-config.yaml:ro
- ./models:/models
Expand Down Expand Up @@ -121,15 +126,13 @@ services:
condition: service_started
environment:
- ECG_DEVICE=${ECG_DEVICE}
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
env_file:
- ./configs/device.env
volumes:
- ./models:/models
- ./videos:/videos
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
group_add:
- video

Expand All @@ -154,7 +157,6 @@ services:
- DEPLOYMENT_ENV=production
- POSE_3D_DEVICE=${POSE_3D_DEVICE:-GPU}
- CONTROL_PORT=8083
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
env_file:
- ./configs/device.env
depends_on:
Expand All @@ -167,7 +169,6 @@ services:
- ./videos:/videos
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
group_add:
- video

Expand All @@ -189,15 +190,13 @@ services:
condition: service_started
environment:
- RPPG_DEVICE=${RPPG_DEVICE}
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
env_file:
- ./configs/device.env
volumes:
- ./models:/models
- ./videos:/videos
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
group_add:
- video

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [[ ! -f "${ROOT_DIR}/configs/device.env" ]]; then
echo "configs/device.env not found; running without NPU override" >&2
exec docker compose -f "${ROOT_DIR}/docker-compose.yaml" up "$@"
fi

source "${ROOT_DIR}/configs/device.env"

TMP_OVERRIDE="$(mktemp)"
trap 'rm -f "${TMP_OVERRIDE}"' EXIT

echo "services:" > "${TMP_OVERRIDE}"

HAS_NPU=false

if [[ "${ECG_DEVICE:-}" == "NPU" ]]; then
HAS_NPU=true
cat >> "${TMP_OVERRIDE}" <<EOF
ai-ecg:
environment:
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
EOF
fi

if [[ "${POSE_3D_DEVICE:-}" == "NPU" ]]; then
HAS_NPU=true
cat >> "${TMP_OVERRIDE}" <<EOF
3dpose-estimation:
environment:
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
EOF
fi

if [[ "${RPPG_DEVICE:-}" == "NPU" ]]; then
HAS_NPU=true
cat >> "${TMP_OVERRIDE}" <<EOF
rppg:
environment:
- ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so
devices:
- "/dev/dri:/dev/dri"
- "/dev/accel/accel0:/dev/accel/accel0"
EOF
fi

if [[ "${HAS_NPU}" == true ]]; then
echo "Detected NPU devices in configs/device.env; using runtime override ${TMP_OVERRIDE}" >&2
exec docker compose --env-file "${ROOT_DIR}/configs/device.env" -f "${ROOT_DIR}/docker-compose.yaml" -f "${TMP_OVERRIDE}" up "$@"
else
echo "No NPU devices configured in configs/device.env; running without NPU override" >&2
exec docker compose --env-file "${ROOT_DIR}/configs/device.env" -f "${ROOT_DIR}/docker-compose.yaml" up "$@"
fi

Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
FROM intel/retail-benchmark:3.3.1
FROM intel/retail-benchmark:3.3.2

ARG HTTP_PROXY

# Optional: Set APT proxy if provided at build time
RUN if [ -n "$HTTP_PROXY" ]; then \
echo "Acquire::http::Proxy \"$HTTP_PROXY\";" > /etc/apt/apt.conf; \
fi

WORKDIR /app

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

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