Skip to content

Commit 9353ea5

Browse files
committed
✨ feat: add model-downloader service with init container integration
Signed-off-by: samzong <[email protected]>
1 parent 37e5941 commit 9353ea5

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
packages: write
4040
strategy:
4141
matrix:
42-
image: [extproc, llm-katan, dashboard]
42+
image: [extproc, llm-katan, dashboard, model-downloader]
4343
# Multi-architecture build strategy:
4444
# - AMD64: Native build on ubuntu-latest (fast)
4545
# - ARM64: Cross-compilation on ubuntu-latest (faster than emulation)
@@ -171,6 +171,10 @@ jobs:
171171
echo "context=." >> $GITHUB_OUTPUT
172172
echo "dockerfile=./dashboard/backend/Dockerfile" >> $GITHUB_OUTPUT
173173
echo "platform=linux/${{ matrix.arch }}" >> $GITHUB_OUTPUT
174+
elif [ "${{ matrix.image }}" = "model-downloader" ]; then
175+
echo "context=." >> $GITHUB_OUTPUT
176+
echo "dockerfile=./Dockerfile.model-downloader" >> $GITHUB_OUTPUT
177+
echo "platform=linux/${{ matrix.arch }}" >> $GITHUB_OUTPUT
174178
fi
175179
176180
- name: Generate tags
@@ -236,7 +240,7 @@ jobs:
236240
packages: write
237241
strategy:
238242
matrix:
239-
image: [extproc, llm-katan, dashboard]
243+
image: [extproc, llm-katan, dashboard, model-downloader]
240244

241245
steps:
242246
- name: Log in to GitHub Container Registry

Dockerfile.model-downloader

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM python:3.11-slim
2+
3+
# Set environment variables
4+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
5+
PIP_NO_CACHE_DIR=1 \
6+
PYTHONUNBUFFERED=1
7+
8+
# Add OCI labels
9+
LABEL org.opencontainers.image.source="https://github.com/vllm-project/semantic-router" \
10+
org.opencontainers.image.description="Lightweight model downloader for Semantic Router with huggingface_hub pre-installed"
11+
12+
WORKDIR /app
13+
14+
# Install minimal dependencies in a single layer
15+
RUN apt-get update && \
16+
apt-get install -y --no-install-recommends \
17+
ca-certificates \
18+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* \
19+
&& pip install --no-cache-dir "huggingface_hub>=0.19.0" \
20+
&& find /usr/local -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true \
21+
&& find /usr/local -type f -name '*.pyc' -delete
22+
23+
# Set default entrypoint to bash to allow script execution from arguments
24+
ENTRYPOINT ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)