x
This commit is contained in:
+5
-4
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user