From cde57c7a810505267dd5d5e8b35136b6a789337e Mon Sep 17 00:00:00 2001 From: Canlin Guo Date: Mon, 20 Apr 2026 17:56:50 +0800 Subject: [PATCH] fix (#2946) Signed-off-by: gcanlin --- .buildkite/pipeline-npu.yaml | 2 +- docker/Dockerfile.npu | 22 +++++++++++++++------- docker/Dockerfile.npu.a3 | 22 +++++++++++++++------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.buildkite/pipeline-npu.yaml b/.buildkite/pipeline-npu.yaml index 553b7e240..9c324dcde 100644 --- a/.buildkite/pipeline-npu.yaml +++ b/.buildkite/pipeline-npu.yaml @@ -72,7 +72,7 @@ steps: --frontend dockerfile.v0 \ --local context=. \ --local dockerfile=./docker \ - --opt filename=Dockerfile.npu.test \ + --opt filename=Dockerfile.npu \ --secret id=dockerconfig,src=/home/user/.docker/config.json \ --output type=image,name=$${IMAGE_REGISTRY}/$${IMAGE_NAME}:$${VLLM_IMAGE_TAG},push=true \ --progress=plain diff --git a/docker/Dockerfile.npu b/docker/Dockerfile.npu index 47ea99fc7..0e18b3668 100644 --- a/docker/Dockerfile.npu +++ b/docker/Dockerfile.npu @@ -5,26 +5,34 @@ FROM ${VLLM_ASCEND_IMAGE}:${VLLM_ASCEND_TAG} WORKDIR /vllm-workspace/vllm RUN git fetch origin --tags && git checkout v0.18.0 +RUN git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf "https://github.com/" + WORKDIR /vllm-workspace/vllm-ascend RUN git fetch origin releases/v0.18.0 && git checkout d781902ce9dbda8ab1e11bb0f2f0c1bc508fee7a # Install vllm-ascend -# Append `libascend_hal.so` path (devlib) to LD_LIBRARY_PATH -RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \ - source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ +RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ source /usr/local/Ascend/nnal/atb/set_env.sh && \ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \ - python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \ + python3 -m pip install -U pip && \ + python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ \ + --index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple \ + --extra-index https://download.pytorch.org/whl/cpu/ \ + --trusted-host cache-service.nginx-pypi-cache.svc.cluster.local \ + --default-timeout=60 python3 -m pip cache purge ARG APP_DIR=/vllm-workspace/vllm-omni WORKDIR ${APP_DIR} COPY . . -RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \ - source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ +RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ source /usr/local/Ascend/nnal/atb/set_env.sh && \ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \ - python3 -m pip install -v -e /vllm-workspace/vllm-omni/ --no-build-isolation + python3 -m pip install -U pip && \ + python3 -m pip install -v -e /vllm-workspace/vllm-omni/ --no-build-isolation \ + --index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple \ + --trusted-host cache-service.nginx-pypi-cache.svc.cluster.local \ + --default-timeout=60 ENV VLLM_WORKER_MULTIPROC_METHOD=spawn diff --git a/docker/Dockerfile.npu.a3 b/docker/Dockerfile.npu.a3 index e91938257..69e80ea75 100644 --- a/docker/Dockerfile.npu.a3 +++ b/docker/Dockerfile.npu.a3 @@ -5,26 +5,34 @@ FROM ${VLLM_ASCEND_IMAGE}:${VLLM_ASCEND_TAG} WORKDIR /vllm-workspace/vllm RUN git fetch origin --tags && git checkout v0.18.0 +RUN git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf "https://github.com/" + WORKDIR /vllm-workspace/vllm-ascend RUN git fetch origin releases/v0.18.0 && git checkout d781902ce9dbda8ab1e11bb0f2f0c1bc508fee7a # Install vllm-ascend -# Append `libascend_hal.so` path (devlib) to LD_LIBRARY_PATH -RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \ - source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ +RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ source /usr/local/Ascend/nnal/atb/set_env.sh && \ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \ - python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \ + python3 -m pip install -U pip && \ + python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ \ + --index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple \ + --extra-index https://download.pytorch.org/whl/cpu/ \ + --trusted-host cache-service.nginx-pypi-cache.svc.cluster.local \ + --default-timeout=60 python3 -m pip cache purge ARG APP_DIR=/vllm-workspace/vllm-omni WORKDIR ${APP_DIR} COPY . . -RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \ - source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ +RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ source /usr/local/Ascend/nnal/atb/set_env.sh && \ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \ - python3 -m pip install -v -e /vllm-workspace/vllm-omni/ --no-build-isolation + python3 -m pip install -U pip && \ + python3 -m pip install -v -e /vllm-workspace/vllm-omni/ --no-build-isolation \ + --index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple \ + --trusted-host cache-service.nginx-pypi-cache.svc.cluster.local \ + --default-timeout=60 ENV VLLM_WORKER_MULTIPROC_METHOD=spawn