Skip to content

Commit 1ca80ba

Browse files
authored
1 parent aa2189d commit 1ca80ba

File tree

12 files changed

+221
-74
lines changed

12 files changed

+221
-74
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
environment:
3939
- WORKLOAD_TYPE=mdpnp
4040
- GRPC_PORT=50051
41-
- HTTP_PORT=8000
41+
- HTTP_PORT=8001
4242
network_mode: "host"
4343

4444
metrics-collector:
@@ -99,7 +99,7 @@ services:
9999
environment:
100100
- GRPC_HOST=localhost
101101
- GRPC_PORT=50051
102-
- MDPNP_DEVICE=${MDPNP_DEVICE}
102+
- MDPNP_DEVICE=${MDPNP_DEVICE:-}
103103
env_file:
104104
- ./configs/device.env
105105
depends_on:
@@ -127,7 +127,7 @@ services:
127127
patient-monitoring-aggregator:
128128
condition: service_started
129129
environment:
130-
- ECG_DEVICE=${ECG_DEVICE}
130+
- ECG_DEVICE=${ECG_DEVICE:-}
131131
env_file:
132132
- ./configs/device.env
133133
volumes:
@@ -191,7 +191,7 @@ services:
191191
patient-monitoring-aggregator:
192192
condition: service_started
193193
environment:
194-
- RPPG_DEVICE=${RPPG_DEVICE}
194+
- RPPG_DEVICE=${RPPG_DEVICE:-}
195195
env_file:
196196
- ./configs/device.env
197197
volumes:
@@ -207,6 +207,8 @@ services:
207207
context: ./services/ui
208208
dockerfile: Dockerfile
209209
args:
210+
VITE_API_BASE_URL: http://${HOST_IP:-localhost}:8001
211+
VITE_POSE_STREAM_URL: http://${HOST_IP:-localhost}:8085/video_feed
210212
HTTP_PROXY: ${HTTP_PROXY}
211213
HTTPS_PROXY: ${HTTPS_PROXY}
212214
NO_PROXY: ${NO_PROXY}

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/helm/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@ This Helm chart deploys the **Health & Life Sciences AI Suite** on Kubernetes.
88
- Kubernetes cluster (Minikube / Kind / Bare-metal)
99
- `kubectl`
1010
- `helm` (v3+)
11-
- Docker images built locally
12-
13-
## Required Docker Images
14-
15-
The following images **must exist locally** before deploying the Helm chart.
16-
17-
Check available images:
18-
```bash
19-
docker images | grep intel/hl-ai
20-
```
2111

2212

2313
## Install
2414

2515
```bash
26-
cd health-and-life-sciences-ai-suite/helm/multi_modal_patient_monitoring
16+
cd /health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/helm/multi_modal_patient_monitoring
2717

2818
helm install multi-modal-patient-monitoring . \
2919
--namespace multi-modal-patient-monitoring \
@@ -53,7 +43,7 @@ kubectl get svc -n multi-modal-patient-monitoring
5343

5444
## Check Logs (recommended)
5545
```bash
56-
kubectl logs -n multi-modal-patient-monitoringi deploy/mdpnp
46+
kubectl logs -n multi-modal-patient-monitoring deploy/mdpnp
5747
kubectl logs -n multi-modal-patient-monitoring deploy/dds-bridge
5848
kubectl logs -n multi-modal-patient-monitoring deploy/aggregator
5949
kubectl logs -n multi-modal-patient-monitoring deploy/ai-ecg

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/helm/multi_modal_patient_monitoring/templates/aggregator-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
imagePullPolicy: {{ .Values.aggregator.image.pullPolicy }}
1919
ports:
2020
- containerPort: 8001
21+
hostPort: 8001
22+
protocol: TCP
2123
- containerPort: 50051
2224
env:
2325
- name: METRICS_SERVICE_URL

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/helm/multi_modal_patient_monitoring/templates/ai-ecg-deployment.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ spec:
1212
labels:
1313
app: ai-ecg
1414
spec:
15-
initContainers:
16-
- name: copy-models
17-
image: "{{ .Values.assets.image.repository }}/{{ .Values.assets.image.name }}:{{ .Values.assets.image.tag }}"
18-
imagePullPolicy: {{ .Values.assets.image.pullPolicy }}
19-
command: ["/bin/sh", "-c"]
20-
args:
21-
- cp -r /opt/assets/models/* /models/
22-
volumeMounts:
23-
- name: models
24-
mountPath: /models
25-
2615
containers:
2716
- name: ai-ecg
2817
image: "{{ .Values.aiEcg.image.repository }}/{{ .Values.aiEcg.image.name }}:{{ .Values.aiEcg.image.tag }}"
@@ -37,17 +26,22 @@ spec:
3726
volumeMounts:
3827
- name: models
3928
mountPath: /models
29+
- name: videos
30+
mountPath: /videos
4031
- name: dri
4132
mountPath: /dev/dri
4233
- name: dev
4334
mountPath: /dev
44-
4535
volumes:
4636
- name: models
47-
emptyDir: {}
37+
persistentVolumeClaim:
38+
claimName: models-pvc
39+
- name: videos
40+
persistentVolumeClaim:
41+
claimName: videos-pvc
4842
- name: dri
4943
hostPath:
5044
path: /dev/dri
5145
- name: dev
5246
hostPath:
53-
path: /dev
47+
path: /dev
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: assets-prep
5+
spec:
6+
template:
7+
spec:
8+
restartPolicy: OnFailure
9+
containers:
10+
- name: assets
11+
image: "{{ .Values.assets.image.repository }}/{{ .Values.assets.image.name }}:{{ .Values.assets.image.tag }}"
12+
imagePullPolicy: {{ .Values.assets.image.pullPolicy }}
13+
envFrom:
14+
- configMapRef:
15+
name: device-config
16+
env:
17+
- name: HTTP_PROXY
18+
value: "http://proxy-pilot.intel.com:912"
19+
- name: HTTPS_PROXY
20+
value: "http://proxy-pilot.intel.com:912"
21+
- name: http_proxy
22+
value: "http://proxy-pilot.intel.com:912"
23+
- name: https_proxy
24+
value: "http://proxy-pilot.intel.com:912"
25+
- name: NO_PROXY
26+
value: "intel.com,.intel.com,10.0.0.0/8,192.168.0.0/16,localhost,.local,127.0.0.0/8,134.134.0.0/16"
27+
- name: no_proxy
28+
value: "intel.com,.intel.com,10.0.0.0/8,192.168.0.0/16,localhost,.local,127.0.0.0/8,134.134.0.0/16"
29+
volumeMounts:
30+
- name: models
31+
mountPath: /models
32+
- name: videos
33+
mountPath: /videos
34+
- name: model-config
35+
mountPath: /app/configs
36+
volumes:
37+
- name: models
38+
persistentVolumeClaim:
39+
claimName: models-pvc
40+
- name: videos
41+
persistentVolumeClaim:
42+
claimName: videos-pvc
43+
- name: model-config
44+
configMap:
45+
name: rppg-model-config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: rppg-model-config
5+
data:
6+
model-config.yaml: |-
7+
ai-ecg:
8+
models:
9+
- name: hubert_ecg_small_fp16
10+
type: ai-ecg
11+
hub: hf
12+
source: hubert-ecg
13+
model_id: Edoardo-BS/hubert-ecg-small
14+
target_dir: /models/ai-ecg
15+
ir_file: hubert_ecg_small_fp16.xml
16+
video_dir: /videos/ai-ecg
17+
18+
rppg:
19+
models:
20+
- name: mtts_can.hdf5
21+
type: rppg
22+
hub: hls
23+
target_dir: /models/rppg
24+
model_file: mtts_can.hdf5
25+
model_url: https://github.com/xliucs/MTTS-CAN/raw/main/mtts_can.hdf5
26+
video_dir: /videos/rppg
27+
video_url: https://github.com/opencv/opencv/raw/master/samples/data/vtest.avi
28+
29+
pose-3d:
30+
models:
31+
- name: human-pose-estimation-3d-0001
32+
type: 3d-pose
33+
hub: hls
34+
target_dir: /models/3d-pose
35+
model_url: https://storage.openvinotoolkit.org/repositories/open_model_zoo/public/2022.1/human-pose-estimation-3d-0001/human-pose-estimation-3d.tar.gz
36+
ir_file: human-pose-estimation-3d-0001.xml
37+
video_dir: /videos/3d-pose
38+
video_url: https://www.pexels.com/download/video/6130537

health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/helm/multi_modal_patient_monitoring/templates/pose-deployment.yaml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,30 @@ spec:
1313
app: pose
1414
spec:
1515
initContainers:
16-
- name: copy-assets
17-
image: "{{ .Values.assets.image.repository }}/{{ .Values.assets.image.name }}:{{ .Values.assets.image.tag }}"
18-
imagePullPolicy: {{ .Values.assets.image.pullPolicy }}
16+
- name: wait-for-pose-assets
17+
image: "{{ .Values.pose.image.repository }}/{{ .Values.pose.image.name }}:{{ .Values.pose.image.tag }}"
18+
imagePullPolicy: {{ .Values.pose.image.pullPolicy }}
1919
command: ["/bin/sh", "-c"]
2020
args:
21-
- >
22-
mkdir -p /models/3d-pose;
23-
cp -r /opt/assets/models/3d-pose/* /models/3d-pose/;
24-
mkdir -p /videos/3d-pose;
25-
cp -r /opt/assets/videos/3d-pose/* /videos/3d-pose/
21+
- |
22+
set -e
23+
MODEL="/models/3d-pose/human-pose-estimation-3d-0001.xml"
24+
VIDEO="/videos/3d-pose/face-demographics-walking.mp4"
25+
for i in $(seq 1 120); do
26+
if [ -f "$MODEL" ] && [ -f "$VIDEO" ]; then
27+
echo "Pose assets found"
28+
exit 0
29+
fi
30+
echo "Waiting for pose assets..."
31+
sleep 5
32+
done
33+
echo "Timed out waiting for pose assets"
34+
exit 1
2635
volumeMounts:
2736
- name: models
2837
mountPath: /models
2938
- name: videos
3039
mountPath: /videos
31-
3240
containers:
3341
- name: pose
3442
image: "{{ .Values.pose.image.repository }}/{{ .Values.pose.image.name }}:{{ .Values.pose.image.tag }}"
@@ -41,7 +49,9 @@ spec:
4149
- "--video"
4250
- "/videos/3d-pose/face-demographics-walking.mp4"
4351
- "--aggregator"
44-
- "aggregator:50051"
52+
- "aggregator:50051"
53+
- "--source-id"
54+
- "3d-pose-camera-1"
4555
securityContext:
4656
privileged: true
4757
envFrom:
@@ -51,7 +61,8 @@ spec:
5161
- containerPort: 8083
5262
- name: video-feed
5363
containerPort: 8085
54-
64+
hostPort: 8085
65+
protocol: TCP
5566
env:
5667
- name: AGGREGATOR_ADDRESS
5768
value: "aggregator:50051"
@@ -63,7 +74,6 @@ spec:
6374
value: "aggregator,localhost,127.0.0.1"
6475
- name: no_proxy
6576
value: "aggregator,localhost,127.0.0.1"
66-
6777
volumeMounts:
6878
- name: models
6979
mountPath: /models
@@ -73,12 +83,13 @@ spec:
7383
mountPath: /dev/dri
7484
- name: dev
7585
mountPath: /dev
76-
7786
volumes:
7887
- name: models
79-
emptyDir: {}
88+
persistentVolumeClaim:
89+
claimName: models-pvc
8090
- name: videos
81-
emptyDir: {}
91+
persistentVolumeClaim:
92+
claimName: videos-pvc
8293
- name: dri
8394
hostPath:
8495
path: /dev/dri
Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
apiVersion: v1
22
kind: PersistentVolumeClaim
33
metadata:
4-
name: health-ai-assets-pvc
4+
name: models-pvc
5+
spec:
6+
accessModes:
7+
- ReadWriteMany
8+
resources:
9+
requests:
10+
storage: {{ .Values.persistence.size }}
11+
12+
---
13+
apiVersion: v1
14+
kind: PersistentVolumeClaim
15+
metadata:
16+
name: videos-pvc
517
spec:
618
accessModes:
719
- ReadWriteMany
820
resources:
921
requests:
1022
storage: {{ .Values.persistence.size }}
23+
24+
---
25+
apiVersion: v1
26+
kind: PersistentVolumeClaim
27+
metadata:
28+
name: health-ai-assets-pvc
29+
spec:
30+
accessModes:
31+
- ReadWriteMany
32+
resources:
33+
requests:
34+
storage: {{ .Values.persistence.size }}

0 commit comments

Comments
 (0)