40 lines
1.8 KiB
Docker
40 lines
1.8 KiB
Docker
ARG VLLM_BASE_IMAGE=vllm/vllm-openai
|
|
ARG VLLM_BASE_TAG=v0.15.0
|
|
FROM ${VLLM_BASE_IMAGE}:${VLLM_BASE_TAG}
|
|
ARG APP_DIR=/workspace/vllm-omni
|
|
WORKDIR ${APP_DIR}
|
|
|
|
COPY . .
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y ffmpeg && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install vLLM wheel for the specific commit
|
|
# URL format: https://wheels.vllm.ai/<commit_hash>/
|
|
# Current vLLM commit: f97ca671766c5201404e9fc812e35bf2c4e95a01
|
|
# Note: --prerelease=allow is required because nightly/commit wheels use
|
|
# pre-release version numbers (e.g. 2.10.0.dev...) which uv ignores by default,
|
|
# causing it to fall back to the older stable release from PyPI.
|
|
RUN uv pip install --system --upgrade --force-reinstall --prerelease=allow vllm --extra-index-url https://wheels.vllm.ai/e94ec597334d9a3e9b0d04bc17152e2747c83d51
|
|
|
|
# Keep flashinfer runtime packages in version sync.
|
|
# We derive the version from installed flashinfer-python (pulled by vllm)
|
|
# and enforce the same version for flashinfer-cubin / flashinfer-jit-cache.
|
|
RUN FLASHINFER_VERSION="$(python3 -c 'import importlib.metadata as m; print(m.version(\"flashinfer-python\"))')" && \
|
|
FLASHINFER_CUDA_TAG="$(python3 -c 'import torch; print((torch.version.cuda or \"12.4\").replace(\".\", \"\"))')" && \
|
|
uv pip install --system --upgrade --force-reinstall \
|
|
"flashinfer-cubin==${FLASHINFER_VERSION}" \
|
|
"flashinfer-jit-cache==${FLASHINFER_VERSION}" \
|
|
--extra-index-url "https://flashinfer.ai/whl/cu${FLASHINFER_CUDA_TAG}" && \
|
|
flashinfer show-config
|
|
|
|
# Install vllm-omni into the same uv-managed Python environment used by the base image.
|
|
RUN uv pip install --python "$(python3 -c 'import sys; print(sys.executable)')" --no-cache-dir ".[dev]"
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
|
|
ENTRYPOINT []
|