From 83e60cf7cf04850344be9fb25f8f5c47b83087f0 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Fri, 3 Jul 2026 06:20:28 +0000 Subject: [PATCH] [CI] Update Dockerfile for vLLM installation and dependency management - Added installation of vLLM from a precompiled wheel with a specific commit. - Set LD_LIBRARY_PATH for CUDA compatibility with bitsandbytes. - Upgraded flashinfer dependencies and ensured proper installation order for torch to avoid symbol issues. --- docker/Dockerfile.ci | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index 8b19ed678..47464426b 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -14,8 +14,48 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* + +# Install vLLM (CUDA 13.0 build) from precompiled wheel at the selected commit. +# Must use direct URL because the wheel has a PEP 440 local version identifier +# (e.g. +gaeee7ef93.cu130) which pip/uv refuse to install from a PEP 503 package index. +# The cu130 wheel index lives at //cu130/vllm/ but the actual wheel files +# are stored at the top level //. +ENV VLLM_PRECOMPILED_WHEEL_COMMIT=ee0da84ab9e04ac7610e28580af62c365e898389 +# Ensure CUDA library path is in LD_LIBRARY_PATH so bitsandbytes' precompiled +# C extension can find libnvJitLink.so.13 (CUDA 13.x JIT linker) at import time. +# The base vLLM image has bitsandbytes pre-installed; without this env var, +# worker subprocesses fail to load bitsandbytes' C extension, producing +# OSError tracebacks that pollute CI logs. +ENV LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib:${LD_LIBRARY_PATH} +RUN VLLM_WHEEL_URL=$(python3 -c "import urllib.request,re; \ + from urllib.parse import urljoin, quote; \ + index_url='https://wheels.vllm.ai/${VLLM_PRECOMPILED_WHEEL_COMMIT}/cu130/vllm/'; \ + html=urllib.request.urlopen(index_url).read().decode(); \ + m=re.search(r'href=\"([^\"]*x86_64\.whl)\"',html); \ + assert m, f'No x86_64 vLLM wheel found at {index_url}'; \ + print(quote(urljoin(index_url,m.group(1)), safe=':/+%'))") && \ + echo "Installing vLLM from: ${VLLM_WHEEL_URL}" && \ + uv pip install --system --force-reinstall "${VLLM_WHEEL_URL}" + + + RUN uv pip install --system ".[dev]" +RUN uv pip install --system --upgrade \ + "flashinfer-python==0.6.12" \ + "flashinfer-cubin==0.6.12" \ + "numpy==2.2.6" + +RUN uv pip install --system --upgrade \ + "flashinfer-jit-cache==0.6.12" \ + --index-url https://flashinfer.ai/whl/cu130 + +# Force-reinstall torch AFTER flashinfer, because flashinfer --upgrade pulls in +# a newer torch (2.12.x) whose libtorch_cuda.so lacks +# at::cuda::getCurrentCUDABlasHandle, causing "undefined symbol" at import time. +RUN uv pip install --system --force-reinstall \ + "torch==2.11.0" "torchaudio==2.11.0" "torchvision==0.26.0" \ + --torch-backend cu130 RUN ln -sf /usr/bin/python3 /usr/bin/python