Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
aa0c7c6
feat: optimum cli parameter pass through implemented openvino plugin
14pankaj Feb 13, 2026
9ddcd87
Updated chatqna script
14pankaj Feb 13, 2026
8084cfe
feat: hls plugin implemented with updated unit testcases
14pankaj Feb 18, 2026
8fe6d5e
feat: url config moved to script
14pankaj Feb 18, 2026
ccb6dab
feat: Openvino plugin with OVMS tag as env
14pankaj Feb 19, 2026
60249d2
feat: minmum openvino version supported 2025.4
14pankaj Feb 20, 2026
e6c7a8e
feat: conflicts fixes with hls
14pankaj Feb 24, 2026
b2ce1f0
chart update
14pankaj Feb 24, 2026
aee11b0
arichitecture_diag_updates
14pankaj Feb 24, 2026
b4391e2
fixes
14pankaj Mar 4, 2026
82bf89a
feat: optimum cli parameter pass through implemented openvino plugin
14pankaj Feb 13, 2026
2d29e16
Updated chatqna script
14pankaj Feb 13, 2026
db44412
feat: hls plugin implemented with updated unit testcases
14pankaj Feb 18, 2026
852d42f
feat: url config moved to script
14pankaj Feb 18, 2026
1f3fe69
feat: Openvino plugin with OVMS tag as env
14pankaj Feb 19, 2026
de7172c
feat: minmum openvino version supported 2025.4
14pankaj Feb 20, 2026
1d9741f
feat: conflicts fixes with hls
14pankaj Feb 24, 2026
bae552d
chart update
14pankaj Feb 24, 2026
c740ee4
arichitecture_diag_updates
14pankaj Feb 24, 2026
c7328b1
fixes
14pankaj Mar 4, 2026
5233241
Merge branch 'pankaj/model_dlsps_hls' of https://github.com/14pankaj/…
14pankaj Mar 4, 2026
5f88de5
updated chart
14pankaj Mar 4, 2026
fe97749
fixes for device and pecision
14pankaj Mar 5, 2026
53cfffd
added extra config in helm embbeding ovms helper yaml
Supriya-Krishnamurthi Mar 5, 2026
b45ef26
readme update with helm doc link
Supriya-Krishnamurthi Mar 5, 2026
4d17bfa
updated tag to rc2 in all docs , updated md, chatqna release notes
Supriya-Krishnamurthi Mar 5, 2026
fb616a6
Merge branch 'release-2026.0.0' into pankaj/model_dlsps_hls
Supriya-Krishnamurthi Mar 5, 2026
599a76a
default device to cpu in precision fix code
Supriya-Krishnamurthi Mar 6, 2026
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
1 change: 1 addition & 0 deletions microservices/model-download/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Below, you'll find links to detailed documentation to help you get started, conf

- **Deployment**
- [How to Build from Source](docs/user-guide/build-from-source.md): Instructions for building the microservice from source code.
- [Deploy with Helm Chart](docs/user-guide/deploy-with-helm-chart.md): Steps to deploy the microservice using Helm.

- **Testing**
- [Running Unit Tests](docs/user-guide/running-tests.md): Comprehensive guide for running the test suite.
Expand Down
2 changes: 1 addition & 1 deletion microservices/model-download/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: model-download-chart
description: A Helm chart for deploying the model-download FastAPI microservice
type: application
version: 1.1.0
version: 1.1.0-rc2
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ spec:
value: "{{ .Values.modeldownload.env.GETI_SERVER_API_VERSION }}"
- name: GETI_SERVER_SSL_VERIFY
value: "{{ .Values.modeldownload.env.GETI_SERVER_SSL_VERIFY }}"
- name: HLS_3D_POSE_CHECKPOINT_URL
value: "{{ .Values.modeldownload.env.HLS_3D_POSE_CHECKPOINT_URL }}"
- name: HLS_ECG_BASE_URL
value: "{{ .Values.modeldownload.env.HLS_ECG_BASE_URL }}"
- name: HLS_RPPG_MODEL_URL
value: "{{ .Values.modeldownload.env.HLS_RPPG_MODEL_URL }}"
command: ["/opt/entrypoint.sh"]
args: ["--plugins", "{{ .Values.modeldownload.env.ENABLED_PLUGINS | default "all" }}"]
volumeMounts:
Expand Down
6 changes: 5 additions & 1 deletion microservices/model-download/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ modeldownload:
name: model-download
image:
registry: "intel/"
tag: 1.1.0-rc1
tag: 1.1.0-rc2
pullPolicy: IfNotPresent

readinessProbe:
Expand All @@ -29,6 +29,10 @@ modeldownload:
GETI_SERVER_API_VERSION: "v1"
GETI_SERVER_SSL_VERIFY: "False"
ENABLED_PLUGINS: "all" #Comma separated list of plugins to enable, or "all"
#HLS pre-configured parameters
HLS_3D_POSE_CHECKPOINT_URL: "https://storage.openvinotoolkit.org/repositories/open_model_zoo/public/2022.1/human-pose-estimation-3d-0001/human-pose-estimation-3d.tar.gz"
HLS_ECG_BASE_URL: "https://raw.githubusercontent.com/Einse57/OpenVINO_sample/master/ai-ecg-master"
HLS_RPPG_MODEL_URL: "https://github.com/xliucs/MTTS-CAN/raw/main/mtts_can.hdf5"

service:
type: NodePort
Expand Down
2 changes: 1 addition & 1 deletion microservices/model-download/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM python:3.12-slim AS python-base
WORKDIR /opt

# Install system dependencies required for uv and the application
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libsm6 \
curl \
Expand Down
4 changes: 4 additions & 0 deletions microservices/model-download/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ services:
- HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN:-}
- ENABLED_PLUGINS=${ENABLED_PLUGINS}
- MODEL_PATH=${MODEL_PATH}
- OVMS_RELEASE_TAG=${OVMS_RELEASE_TAG:-v2025.4.1}
- GETI_HOST=${GETI_HOST}
- GETI_TOKEN=${GETI_TOKEN}
- GETI_WORKSPACE_ID=${GETI_WORKSPACE_ID}
- GETI_SERVER_API_VERSION=${GETI_SERVER_API_VERSION:-v1}
- GETI_SERVER_SSL_VERIFY=${GETI_SERVER_SSL_VERIFY:-False}
- HLS_3D_POSE_CHECKPOINT_URL=${HLS_3D_POSE_CHECKPOINT_URL}
- HLS_ECG_BASE_URL=${HLS_ECG_BASE_URL}
- HLS_RPPG_MODEL_URL=${HLS_RPPG_MODEL_URL}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 60s
Expand Down
247 changes: 189 additions & 58 deletions microservices/model-download/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ NC='\033[0m' # No Color
# Store which plugins are activated for runtime checks
PLUGINS_ENV_FILE="/opt/activated_plugins.env"

# Temporary directory for parallel job coordination
PARALLEL_TMP_DIR=$(mktemp -d)
# Cleanup temp dir on exit
trap 'rm -rf "${PARALLEL_TMP_DIR}"' EXIT

# Function to print status messages
print_success() {
echo -e "${GREEN} SUCCESS:${NC} $1"
Expand All @@ -35,84 +40,187 @@ print_header() {
echo -e "${CYAN}=======================================${NC}"
}

# Function to install dependencies for specific plugins
# Function to install dependencies for a single plugin.
# Output goes directly to stdout (the caller pipes it through awk for prefixing).
# Results (exit code and any exported env vars) are written to status/env files
# under PARALLEL_TMP_DIR so the parent shell can pick them up after all jobs finish.
install_dependencies() {
local plugin=$1
print_header "Preparing $plugin plugin"

local status_file="${PARALLEL_TMP_DIR}/${plugin}.status"
local env_file="${PARALLEL_TMP_DIR}/${plugin}.env"

echo -e "${CYAN}=======================================${NC}"
echo -e "${CYAN} Preparing ${plugin} plugin${NC}"
echo -e "${CYAN}=======================================${NC}"

case $plugin in
openvino)
print_info "OpenVINO dependencies will be installed via uv sync"
# Normalize OVMS_RELEASE_TAG to URL-friendly format (releases/YYYY/M)
OVMS_RELEASE_TAG="${OVMS_RELEASE_TAG:-v2025.4.1}"
DEFAULT_OVMS_TAG="v2025.4.1"
echo -e "${BLUE}INFO:${NC} Input OVMS release tag: ${OVMS_RELEASE_TAG}"

# Check if using default version - skip downloads and use pyproject.toml pinned versions
if [[ "${OVMS_RELEASE_TAG}" == "${DEFAULT_OVMS_TAG}" ]]; then
echo -e "${BLUE}INFO:${NC} Using default OVMS version (${OVMS_RELEASE_TAG}). Skipping downloads."
echo -e "${BLUE}INFO:${NC} Dependencies from pyproject.toml will be used (pre-pinned for OVMS 2025.4.1)"
echo "OVMS_REQUIREMENTS_FILE=" >> "${env_file}"
echo "OVMS_CUSTOM_TAG=false" >> "${env_file}"
# Only process non-default versions if tag is in vYYYY.M or vYYYY.M.P format
elif [[ "${OVMS_RELEASE_TAG}" =~ ^v[0-9]{4}\.[0-9]+(\.[0-9]+)?$ ]]; then
echo -e "${BLUE}INFO:${NC} Custom OVMS version detected. Downloading version-specific files for: ${OVMS_RELEASE_TAG}"

# Use tag directly in URL (v2025.4 -> releases/2025/4)
OVMS_URL_TAG="releases/${OVMS_RELEASE_TAG:1:4}/${OVMS_RELEASE_TAG:6:1}"

# Download export_model.py
EXPORT_SCRIPT_URL="https://raw.githubusercontent.com/openvinotoolkit/model_server/${OVMS_URL_TAG}/demos/common/export_models/export_model.py"
mkdir -p /opt/scripts
if curl -fsSL -o /opt/scripts/export_model.py "${EXPORT_SCRIPT_URL}"; then
echo -e "${GREEN} SUCCESS:${NC} export_model.py downloaded for OVMS ${OVMS_RELEASE_TAG}"
else
echo -e "${YELLOW} WARNING:${NC} Failed to download export_model.py. Falling back to bundled script."
fi

# Download requirements.txt - used INSTEAD of pyproject.toml openvino extra to avoid conflicts
REQUIREMENTS_URL="https://raw.githubusercontent.com/openvinotoolkit/model_server/${OVMS_URL_TAG}/demos/common/export_models/requirements.txt"
REQUIREMENTS_FILE="/tmp/openvino_requirements_${OVMS_RELEASE_TAG//[\.\/ ]/_}.txt"
if curl -fsSL -o "${REQUIREMENTS_FILE}" "${REQUIREMENTS_URL}"; then
echo -e "${GREEN} SUCCESS:${NC} OVMS requirements.txt downloaded"
echo "OVMS_REQUIREMENTS_FILE=${REQUIREMENTS_FILE}" >> "${env_file}"
echo "OVMS_CUSTOM_TAG=true" >> "${env_file}"
else
echo -e "${YELLOW} WARNING:${NC} Failed to download requirements.txt. Falling back to pyproject.toml defaults."
echo "OVMS_REQUIREMENTS_FILE=" >> "${env_file}"
echo "OVMS_CUSTOM_TAG=false" >> "${env_file}"
fi
else
echo -e "${RED} ERROR:${NC} Invalid OVMS_RELEASE_TAG format '${OVMS_RELEASE_TAG}'. Expected format: vYYYY.M.P (e.g. v2025.4.1)"
echo "OVMS_REQUIREMENTS_FILE=" >> "${env_file}"
echo "OVMS_CUSTOM_TAG=false" >> "${env_file}"
fi
echo "0" > "${status_file}"
;;
huggingface)
print_info "HuggingFace dependencies will be installed via uv sync"
# Additional setup can be added here if needed
echo -e "${BLUE}INFO:${NC} HuggingFace dependencies will be installed via uv sync"
echo "0" > "${status_file}"
;;
ollama)
print_info "Installing Ollama binary..."
OLLAMA_VERSION="v0.14.0"
OLLAMA_ARCHIVE="ollama-linux-amd64.tar.zst"
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${OLLAMA_VERSION}/${OLLAMA_ARCHIVE}"
echo -e "${BLUE}INFO:${NC} Installing Ollama binary..."
OLLAMA_VERSION="v0.17.4"
OLLAMA_ARCHIVE="${PARALLEL_TMP_DIR}/ollama-linux-amd64.tar.zst"
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${OLLAMA_VERSION}/ollama-linux-amd64.tar.zst"

# Ensure zstd is available
if ! command -v zstd &> /dev/null && ! command -v unzstd &> /dev/null; then
print_error "zstd is not installed. Please install zstd package."
return 1
fi

print_info "Downloading Ollama ${OLLAMA_VERSION}..."
if ! curl -fSL -o "${OLLAMA_ARCHIVE}" "${OLLAMA_URL}"; then
print_error "Failed to download Ollama binary from ${OLLAMA_URL}"
echo -e "${RED} ERROR:${NC} zstd is not installed. Please install zstd package."
echo "1" > "${status_file}"
return 1
fi

print_info "Extracting Ollama binary..."
if ! tar --use-compress-program=unzstd -xf "${OLLAMA_ARCHIVE}" -C "/opt/"; then
print_error "Failed to extract Ollama binary"
rm -f "${OLLAMA_ARCHIVE}"

mkdir -p /opt/bin

echo -e "${BLUE}INFO:${NC} Downloading and extracting Ollama ${OLLAMA_VERSION} binary only..."
# Stream the archive and extract only the ollama binary - avoids writing full archive to disk
if ! curl -fSL "${OLLAMA_URL}" | tar --use-compress-program=unzstd -xf - -C /opt/bin --strip-components=1 bin/ollama; then
echo -e "${RED} ERROR:${NC} Failed to download or extract Ollama binary"
echo "1" > "${status_file}"
return 1
fi

rm "${OLLAMA_ARCHIVE}"

# Make all binaries executable
if [ -d "/opt/bin" ]; then
chmod +x /opt/bin/* 2>/dev/null || true
fi


chmod +x /opt/bin/ollama

# Verify ollama binary is present and executable
if [ -x "/opt/bin/ollama" ]; then
print_success "Ollama binary v0.14.0 installed successfully to /opt/bin/ollama"
echo -e "${GREEN} SUCCESS:${NC} Ollama binary ${OLLAMA_VERSION} installed successfully to /opt/bin/ollama"
/opt/bin/ollama --version 2>&1 | grep -i "version" || true
else
print_error "Ollama binary not found or not executable at /opt/bin/ollama"
echo -e "${RED} ERROR:${NC} Ollama binary not found or not executable at /opt/bin/ollama"
echo "1" > "${status_file}"
return 1
fi
echo "0" > "${status_file}"
;;
ultralytics)
print_info "Downloading Ultralytics public models script from GitHub"
echo -e "${BLUE}INFO:${NC} Downloading Ultralytics public models script from GitHub"
mkdir -p /opt/scripts
if curl -fsSL -o /opt/scripts/download_public_models.sh https://raw.githubusercontent.com/open-edge-platform/dlstreamer/v2025.2.0/samples/download_public_models.sh; then
chmod +x /opt/scripts/download_public_models.sh
print_success "Ultralytics public models script downloaded to /opt/scripts/download_public_models.sh"
echo -e "${GREEN} SUCCESS:${NC} Ultralytics public models script downloaded to /opt/scripts/download_public_models.sh"
else
print_error "Failed to download Ultralytics public models script"
echo -e "${RED} ERROR:${NC} Failed to download Ultralytics public models script"
echo "1" > "${status_file}"
return 1
fi
print_info "Ultralytics dependencies will be installed via uv sync"
# Additional setup can be added here if needed
echo -e "${BLUE}INFO:${NC} Ultralytics dependencies will be installed via uv sync"
echo "0" > "${status_file}"
;;
geti)
print_info "Geti plugin dependencies will be installed via uv sync"
print_info "Geti plugin requires: GETI_HOST,GETI_TOKEN, GETI_SERVER_API_VERSION"
echo -e "${BLUE}INFO:${NC} Geti plugin dependencies will be installed via uv sync"
echo -e "${BLUE}INFO:${NC} Geti plugin requires: GETI_HOST, GETI_TOKEN, GETI_SERVER_API_VERSION"
echo "0" > "${status_file}"
;;
hls)
print_info "HLS plugin dependencies will be installed via uv sync"
echo "0" > "${status_file}"
;;
*)
print_error "Unknown plugin: $plugin"
echo -e "${RED} ERROR:${NC} Unknown plugin: $plugin"
echo "1" > "${status_file}"
return 1
;;
esac
}

run_plugins_parallel() {
local plugins=("$@")
local pids=()

print_header "Installing plugin dependencies in parallel"

for plugin in "${plugins[@]}"; do
# Pipe output through awk for real-time prefixed streaming
(install_dependencies "${plugin}") 2>&1 \
| awk -v p="${plugin}" '{ print "[" p "] " $0; fflush() }' &
pids+=("$!")
print_info "Started setup for plugin: ${plugin}"
done

# Wait for all background pipeline jobs to finish
for pid in "${pids[@]}"; do
wait "${pid}" || true
done

# Check status files written by each subshell
local failed_plugins=()
for plugin in "${plugins[@]}"; do
local status_file="${PARALLEL_TMP_DIR}/${plugin}.status"
local exit_code=1
if [ -f "${status_file}" ]; then
exit_code=$(cat "${status_file}")
fi
if [ "${exit_code}" != "0" ]; then
failed_plugins+=("${plugin}")
fi
done

# Source any env vars written by subshells (e.g. OVMS_REQUIREMENTS_FILE)
for plugin in "${plugins[@]}"; do
local env_file="${PARALLEL_TMP_DIR}/${plugin}.env"
if [ -f "${env_file}" ]; then
# shellcheck disable=SC1090
source "${env_file}"
fi
done

if [ "${#failed_plugins[@]}" -gt 0 ]; then
print_error "The following plugins failed to set up: ${failed_plugins[*]}"
exit 1
fi

print_success "All plugin setups completed"
}

# Parse arguments
PLUGINS=""
START_SERVICE=true
Expand All @@ -137,34 +245,45 @@ while [[ $# -gt 0 ]]; do
done

# Define all available plugins in the application
AVAILABLE_PLUGINS=("openvino" "huggingface" "ollama" "ultralytics" "geti")
AVAILABLE_PLUGINS=("openvino" "huggingface" "ollama" "ultralytics" "geti" "hls")

# Install plugin-specific dependencies
print_header "Installing plugin dependencies"
# Install plugin-specific dependencies (in parallel)
if [ "$PLUGINS" = "all" ]; then
print_info "Installing ALL plugins"

# Install dependencies for all available plugins
run_plugins_parallel "${AVAILABLE_PLUGINS[@]}"
for plugin in "${AVAILABLE_PLUGINS[@]}"; do
install_dependencies "$plugin"
# Add to extra args for uv sync
EXTRA_ARGS+=("--extra" "$plugin")
if [[ "$plugin" == "openvino" && "${OVMS_CUSTOM_TAG}" == "true" ]]; then
print_info "Skipping openvino uv extra — dependencies will be installed from openvino model server requirements.txt"
elif [[ "$plugin" == "hls" ]]; then
print_info "Skipping hls uv extra — HLS dependencies are installed in an isolated venv at first request"
else
EXTRA_ARGS+=("--extra" "$plugin")
fi
done

echo "ACTIVATED_PLUGINS=all" > "$PLUGINS_ENV_FILE"
print_success "All plugins are activated"
else
# Split comma-separated plugins and install dependencies for each
# Split comma-separated plugins and run them in parallel
IFS=',' read -ra PLUGIN_LIST <<< "$PLUGINS"
echo "ACTIVATED_PLUGINS=$PLUGINS" > "$PLUGINS_ENV_FILE"

# Trim whitespace from each plugin name
TRIMMED_PLUGINS=()
for plugin in "${PLUGIN_LIST[@]}"; do
plugin=$(echo "$plugin" | xargs) # Trim whitespace
install_dependencies "$plugin"
# Add to extra args for uv sync
EXTRA_ARGS+=("--extra" "$plugin")
TRIMMED_PLUGINS+=("$(echo "$plugin" | xargs)")
done


run_plugins_parallel "${TRIMMED_PLUGINS[@]}"

for plugin in "${TRIMMED_PLUGINS[@]}"; do
if [[ "$plugin" == "openvino" && "${OVMS_CUSTOM_TAG}" == "true" ]]; then
print_info "Skipping openvino uv extra — dependencies will be installed from OpenVINO model server requirements.txt"
elif [[ "$plugin" == "hls" ]]; then
print_info "Skipping hls uv extra — HLS dependencies are installed in an isolated venv at first request"
else
EXTRA_ARGS+=("--extra" "$plugin")
fi
done

echo "ACTIVATED_PLUGINS=$PLUGINS" > "$PLUGINS_ENV_FILE"
print_success "Activated plugins: $PLUGINS"
fi

Expand All @@ -178,6 +297,18 @@ export PATH="/opt/bin/:$PATH"

if uv sync "${EXTRA_ARGS[@]}"; then
print_success "Dependencies synced successfully"

# If OpenVINO was installed and we have a requirements file, install OpenVINO-specific pins
if [ -n "${OVMS_REQUIREMENTS_FILE}" ] && [ -f "${OVMS_REQUIREMENTS_FILE}" ]; then
print_header "Installing OpenVINO dependencies"
print_info "Installing from: ${OVMS_REQUIREMENTS_FILE}"
if uv pip install -r "${OVMS_REQUIREMENTS_FILE}"; then
print_success "OpenVINO dependencies installed successfully"
else
print_warning "Failed to install OpenVINO dependencies, continuing with base versions"
fi
fi

# Activate the virtual environment created by uv sync
if [ -d "/opt/.venv" ]; then
print_info "Activating virtual environment"
Expand Down
Loading
Loading