Skip to content

Commit 07e8b58

Browse files
ITEP-73124: fix missing models in k8s deployment (#228)
## 📝 Description After recent refactoring in #99 we need to adjust how models are beeing downloaded for k8s deployment. ### Testing ``` SKIP_BRINGUP=1 REQUIRED_FPS=0 ./deploy.sh && make -C kubernetes NAME: scenescape-release-1 LAST DEPLOYED: Tue Jul 29 15:39:10 2025 NAMESPACE: scenescape STATUS: deployed REVISION: 1 TEST SUITE: None make: Leaving directory '/home/jdanieck/repos/scenescape/kubernetes' jdanieck@jdanieck-dev:~/repos/scenescape$ k -n scenescape get pods NAME READY STATUS RESTARTS AGE scenescape-release-1-atag-qcam1-atag-qcam1-de57f5c8-video-mfxrl 1/1 Running 0 98s scenescape-release-1-atag-qcam2-atag-qcam2-d41a19c2-video-xxnxs 1/1 Running 0 98s scenescape-release-1-broker-dep-599b987cf7-4pqvs 1/1 Running 0 4m44s scenescape-release-1-camcalibration-dep-8667f5f9dd-ftqkk 1/1 Running 0 4m44s scenescape-release-1-camera1-camera1-858d3192-video-dep-6562xv4 1/1 Running 0 98s scenescape-release-1-camera2-camera2-f4b78bdb-video-dep-578d25n 1/1 Running 0 98s scenescape-release-1-kubeclient-dep-7f99f85b65-4cdpv 1/1 Running 0 4m44s scenescape-release-1-ntp-dep-7fc76bdb75-7x4jt 1/1 Running 0 4m44s scenescape-release-1-pgserver-dep-77b5ddd7f4-nqtzj 1/1 Running 0 4m44s scenescape-release-1-scene-dep-b59678668-svb5f 1/1 Running 0 4m44s scenescape-release-1-vdms-dep-5cfbd88dfb-r7gsj 1/1 Running 0 4m44s scenescape-release-1-web-dep-c7877f6f4-d2lr4 1/1 Running 0 4m44s ... <img width="1248" height="883" alt="image" src="https://github.com/user-attachments/assets/a19dbd58-270b-4cbf-89c7-d13d87925670" /> ## ✨ Type of Change Select the type of change your PR introduces: - [x] 🐞 **Bug fix** – Non-breaking change which fixes an issue - [ ] 🚀 **New feature** – Non-breaking change which adds functionality - [ ] 🔨 **Refactor** – Non-breaking change which refactors the code base - [ ] 💥 **Breaking change** – Changes that break existing functionality - [ ] 📚 **Documentation update** - [ ] 🔒 **Security update** - [ ] 🧪 **Tests** - [ ] 🚂 **CI** ## 🧪 Testing Scenarios Describe how the changes were tested and how reviewers can test them too: - [x] ✅ Tested manually - [ ] 🤖 Ran automated end-to-end tests ## ✅ Checklist Before submitting the PR, ensure the following: - [ ] 🔍 PR title is clear and descriptive - [ ] 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR **title**. Do **not** include full URLs - [ ] 💬 I have commented my code, especially in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ✅ I have added tests that prove my fix is effective or my feature works --------- Co-authored-by: Sarat Poluri <[email protected]>
1 parent f67d9c4 commit 07e8b58

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

kubernetes/init-images/Dockerfile-models

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1-
# -*- mode: Fundamental; indent-tabs-mode: nil -*-
21

32
# SPDX-FileCopyrightText: (C) 2023 - 2025 Intel Corporation
43
# SPDX-License-Identifier: Apache-2.0
54

6-
FROM busybox
5+
# --- Builder stage ---
6+
FROM python:3.12-slim@sha256:9c1d9ed7593f2552a4ea47362ec0d2ddf5923458a53d0c8e30edf8b398c94a31 AS builder
77

8-
COPY model_installer/models /root/models
8+
WORKDIR /root
99

10+
RUN apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/*
11+
12+
COPY model_installer/src/install-omz-models model_installer/requirements-runtime.txt .
13+
COPY percebro/config/model-config.json .
14+
15+
RUN pip install --no-cache-dir -r requirements-runtime.txt
16+
17+
ENV MODEL_DIR=/root/models
18+
ENV MODEL_CONFIGFILE=/root/model-config.json
19+
RUN python install-omz-models --default --precisions FP32
20+
21+
# --- Runtime stage ---
22+
FROM busybox:1.37@sha256:f9a104fddb33220ec80fc45a4e606c74aadf1ef7a3832eb0b05be9e90cd61f5f
23+
24+
WORKDIR /root
25+
26+
COPY --from=builder /root/models /root/models
1027
COPY sample_data /root/sample_data
1128
COPY controller/config/tracker-config.json /root/controller/tracker-config.json
1229

model_installer/src/install-omz-models

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ OMZ_DIR = "/usr/local/lib/open_model_zoo"
1515
MODEL_DIR = os.environ.get("MODEL_DIR") if "MODEL_DIR" in os.environ else "/workspace/models"
1616
OVMS_MODEL_DIR = os.path.join(MODEL_DIR, "ovms")
1717
MODEL_CACHE_DIR = os.path.join(OVMS_MODEL_DIR, "cache")
18-
MODEL_CONFIGFILE = "/workspace/percebro/config/model-config.json"
18+
MODEL_CONFIGFILE = os.environ.get("MODEL_CONFIGFILE") if "MODEL_CONFIGFILE" in os.environ else "/workspace/percebro/config/model-config.json"
1919
OVMS_CONFIGFILE = f"{MODEL_DIR}/ovms-config.json"
2020
OMZ_BASE_URL = "https://storage.openvinotoolkit.org/repositories/open_model_zoo/2023.0/models_bin/1"
2121
# Special case: some public models have a different base URL

0 commit comments

Comments
 (0)