From 35b3dd638abe7d64fe1116e2c2ad293cc401a746 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Tue, 17 Mar 2026 06:08:59 +0000 Subject: [PATCH] Refactor Dockerfile.ci to install vLLM from a dynamically retrieved precompiled wheel URL, improving the installation process by ensuring compatibility with PEP 440 local version identifiers. This change enhances the reliability of vLLM installations. Signed-off-by: tzhouam Signed-off-by: tzhouam --- docker/Dockerfile.ci | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index e5182e076..c56e9e83f 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -13,11 +13,16 @@ RUN apt-get update && \ RUN uv pip uninstall --system -y vllm || true -# Install vLLM from source at the selected commit using precompiled artifacts +# Install vLLM from precompiled wheel at the selected commit. +# Must use direct URL because the wheel has a PEP 440 local version identifier +# (e.g. +g0a0a1a198) which pip/uv refuse to install from a PEP 503 package index. ENV VLLM_PRECOMPILED_WHEEL_COMMIT=0a0a1a198be88e1782b52fa31738896468200a76 -RUN uv pip install --system --force-reinstall --prerelease=allow vllm \ - --index-url https://wheels.vllm.ai/${VLLM_PRECOMPILED_WHEEL_COMMIT} \ - --extra-index-url https://pypi.org/simple/ +RUN VLLM_WHEEL_URL=$(python3 -c "import urllib.request,re; \ + html=urllib.request.urlopen('https://wheels.vllm.ai/${VLLM_PRECOMPILED_WHEEL_COMMIT}/vllm/').read().decode(); \ + m=re.search(r'>(\S+x86_64\.whl)<',html); \ + print('https://wheels.vllm.ai/${VLLM_PRECOMPILED_WHEEL_COMMIT}/'+m.group(1).replace('+','%2B'))") && \ + echo "Installing vLLM from: ${VLLM_WHEEL_URL}" && \ + uv pip install --system --force-reinstall "${VLLM_WHEEL_URL}" RUN uv pip install --system ".[dev]"