This commit is contained in:
2026-06-04 14:02:25 +08:00
parent a9489cd9d9
commit 69b583340b
+2
View File
@@ -192,6 +192,8 @@ RUN set -ex && \
RUN set -ex && \ RUN set -ex && \
# 安装 vllm(让 pip 解析运行时依赖:xgrammar, regex, compressed_tensors 等) # 安装 vllm(让 pip 解析运行时依赖:xgrammar, regex, compressed_tensors 等)
cd /opt/vllm && ${VENV}/bin/pip install --no-cache-dir -e . --no-build-isolation && \ cd /opt/vllm && ${VENV}/bin/pip install --no-cache-dir -e . --no-build-isolation && \
# --no-build-isolation 可能漏装部分运行时依赖,显式补装
${VENV}/bin/pip install --no-cache-dir regex && \
# 验证 PyTorch 没被 vllm 依赖覆盖 # 验证 PyTorch 没被 vllm 依赖覆盖
${VENV}/bin/python -c "import torch; v=torch.__version__; assert 'rocm' in v, f'PyTorch overwritten by vllm deps: {v}'; print('PyTorch OK:', v)" && \ ${VENV}/bin/python -c "import torch; v=torch.__version__; assert 'rocm' in v, f'PyTorch overwritten by vllm deps: {v}'; print('PyTorch OK:', v)" && \
# 先重装 ROCm PyTorch 覆盖可能的 CUDA 版,再清理 CUDA triton 元数据 # 先重装 ROCm PyTorch 覆盖可能的 CUDA 版,再清理 CUDA triton 元数据