From 146d0a1ff36c04750b8e4b24359df6f7f1eeeecf Mon Sep 17 00:00:00 2001 From: chenjw28 <792430652@qq.com> Date: Wed, 17 Jun 2026 13:56:12 +0800 Subject: [PATCH] x --- docker/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ed4d383..2d733b0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -286,11 +286,12 @@ COPY scripts/cache_warmer.py /opt/scripts/cache_warmer.py # =========================================================================== RUN set -ex && \ export http_proxy=${GIT_PROXY} https_proxy=${GIT_PROXY} && \ - # 1) 安装 vllm(--no-build-isolation 不自动装运行时依赖,torch 另从 ROCm index 装) + # 1) 安装 vllm 运行时依赖,但过滤 torch/triton/setuptools(这些必须走 ROCm 专用源/版本) cd /opt/vllm && \ - ${VENV}/bin/pip install -e . --no-build-isolation && \ - # 2) 安装 vllm 运行时依赖中与 torch 无关的包(torch 本身在下步用 ROCm index 装) - ${VENV}/bin/pip install huggingface_hub msgspec aiohttp gguf cbor2 pyzmq && \ + grep -vE '^(torch|torchvision|torchaudio|triton|triton-rocm|pytorch-triton|setuptools)' requirements/common.txt > /tmp/vllm_deps.txt && \ + ${VENV}/bin/pip install -r /tmp/vllm_deps.txt && \ + # 2) 注册 vllm 源码包,不让 pip 解析 torch 依赖(否则会从普通 PyPI 找 triton-rocm 失败) + ${VENV}/bin/pip install -e . --no-build-isolation --no-deps && \ # 3) 强制复查 PyTorch(vllm 依赖可能拉成 CUDA 版 torch) (${VENV}/bin/pip uninstall -y triton triton-rocm 2>/dev/null || true) && \ ${VENV}/bin/pip install --force-reinstall \