Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Signed-off-by: Zhou Taichang <tzhouam@connect.ust.hk> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
61 lines
2.5 KiB
Docker
61 lines
2.5 KiB
Docker
# Target vLLM version: v0.29.0 (tag @ 98dff2a81d74).
|
|
# Use the matching release image and its coherent CUDA/PyTorch/FlashInfer
|
|
# runtime. Do not reinstall a commit wheel or repair dependencies on top of
|
|
# an older base image at a release boundary. For a future unreleased target,
|
|
# restore an explicit wheel pin and validate its complete runtime stack.
|
|
ARG VLLM_BASE_IMAGE=vllm/vllm-openai
|
|
ARG VLLM_BASE_TAG=v0.29.0
|
|
|
|
# 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
|
|
# 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
|
|
WORKDIR ${APP_DIR}
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
|
|
# 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
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y espeak-ng git jq && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# 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/
|
|
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0
|
|
# 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]"
|
|
|
|
# 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
|
|
# the heavy base image to build it. Editable install above already
|
|
# registered APP_DIR, so we must not re-pip-install after COPY.
|
|
FROM deps
|
|
ARG APP_DIR=/opt/vllm-omni
|
|
WORKDIR ${APP_DIR}
|
|
|
|
COPY --link . .
|
|
|
|
ENTRYPOINT []
|