2026-10-05 14:11:01 +08:00
|
|
|
# Use the official release image with its matching CUDA/PyTorch stack.
|
|
|
|
|
ARG VLLM_VERSION=0.31.0
|
2025-12-04 23:23:22 +08:00
|
|
|
ARG VLLM_BASE_IMAGE=vllm/vllm-openai
|
2026-10-05 14:11:01 +08:00
|
|
|
ARG VLLM_BASE_TAG=v${VLLM_VERSION}
|
2026-07-22 19:14:55 -06:00
|
|
|
|
|
|
|
|
# We use registry-based layer caching for the dependencies,
|
|
|
|
|
# where the tag is determined based on the hash of the contents
|
|
|
|
|
# of files like pyproject.toml, etc. The deps stage should have
|
|
|
|
|
# everything except the actual project dir, since that should not
|
|
|
|
|
# change much across branches.
|
|
|
|
|
FROM ${VLLM_BASE_IMAGE}:${VLLM_BASE_TAG} AS deps
|
2026-10-05 14:11:01 +08:00
|
|
|
ARG VLLM_VERSION
|
2026-07-25 00:34:30 +08:00
|
|
|
# Keep APP_DIR outside /workspace so k8s Buildkite workspace mounts cannot
|
|
|
|
|
# shadow the editable install target (#5364). Docker WORKDIR creates /opt if
|
|
|
|
|
# needed.
|
|
|
|
|
ARG APP_DIR=/opt/vllm-omni
|
2025-12-04 23:23:22 +08:00
|
|
|
WORKDIR ${APP_DIR}
|
2026-07-22 19:14:55 -06:00
|
|
|
|
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
|
|
|
|
2026-07-23 22:15:52 +08:00
|
|
|
# Placeholder package tree so editable install can register APP_DIR.
|
|
|
|
|
# The final stage COPY --link fills this directory with the real sources;
|
|
|
|
|
# the editable .pth / egg-link keeps resolving imports there — no PYTHONPATH.
|
|
|
|
|
RUN mkdir -p vllm_omni && touch vllm_omni/__init__.py
|
2026-02-03 13:43:45 +08:00
|
|
|
|
2026-01-16 21:16:43 +08:00
|
|
|
# Install system dependencies
|
|
|
|
|
RUN apt-get update && \
|
2026-04-16 21:24:47 -04:00
|
|
|
apt-get install -y espeak-ng git jq && \
|
2026-02-03 13:43:45 +08:00
|
|
|
apt-get clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2026-01-16 21:16:43 +08:00
|
|
|
|
2026-07-22 19:14:55 -06:00
|
|
|
# Copy dependency related things first and install deps/
|
|
|
|
|
# We set the version str to 0.0.0 since it doesn't matter
|
|
|
|
|
# for CI
|
|
|
|
|
COPY pyproject.toml setup.py ./
|
|
|
|
|
COPY requirements/ requirements/
|
2026-10-05 14:11:01 +08:00
|
|
|
# Scope the override to Omni; dependency source builds need their own versions.
|
|
|
|
|
ENV VLLM_OMNI_VERSION_OVERRIDE=0.0.0
|
2026-07-23 22:15:52 +08:00
|
|
|
# Editable install: deps + project metadata are cached in this layer, while
|
|
|
|
|
# the package itself is linked to APP_DIR (populated later by COPY --link).
|
|
|
|
|
# Do NOT use a non-editable install here — that copies an empty stub into
|
|
|
|
|
# site-packages and breaks ``import vllm_omni.entrypoints``.
|
|
|
|
|
RUN uv pip install --system -e ".[dev]"
|
2026-10-05 14:11:01 +08:00
|
|
|
# Fail the image build if dependency resolution replaced the selected vLLM.
|
|
|
|
|
# The CPU builder has no NVIDIA driver; CUDA imports are checked at the start
|
|
|
|
|
# of each GPU test job by .buildkite/cuda/scripts/check_vllm_runtime.py.
|
|
|
|
|
RUN python3 -c "import vllm; assert vllm.__version__ == '${VLLM_VERSION}', vllm.__version__"
|
2026-02-13 18:05:07 +08:00
|
|
|
|
2026-07-22 19:14:55 -06:00
|
|
|
# The final stage just copies the working dir on top of the
|
|
|
|
|
# dependencies image. This uses --link so that we can skip
|
|
|
|
|
# the image pull in Buildkite when we have a cache hit.
|
|
|
|
|
#
|
|
|
|
|
# IMPORTANT: Do not make any modifications that depend on the
|
|
|
|
|
# file system after the --link copy, otherwise we'd need to pull
|
2026-07-23 22:15:52 +08:00
|
|
|
# the heavy base image to build it. Editable install above already
|
|
|
|
|
# registered APP_DIR, so we must not re-pip-install after COPY.
|
2026-07-22 19:14:55 -06:00
|
|
|
FROM deps
|
2026-07-25 00:34:30 +08:00
|
|
|
ARG APP_DIR=/opt/vllm-omni
|
2026-07-22 19:14:55 -06:00
|
|
|
WORKDIR ${APP_DIR}
|
2026-06-14 00:43:02 +08:00
|
|
|
|
2026-07-22 19:14:55 -06:00
|
|
|
COPY --link . .
|
2026-02-03 13:43:45 +08:00
|
|
|
|
2025-12-04 23:23:22 +08:00
|
|
|
ENTRYPOINT []
|