Skip to content

Commit c699908

Browse files
UsernameFullHuangJoJo
authored andcommitted
fix(ascend): update NPU Docker installation
1 parent 8eb27cc commit c699908

4 files changed

Lines changed: 22 additions & 10 deletions

File tree

docker/Dockerfile.A2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ RUN cd vllm && \
3636
pip cache purge && \
3737
cd ..
3838

39-
RUN pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0
39+
RUN pip install \
40+
--index-url https://download.pytorch.org/whl/cpu \
41+
--extra-index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
42+
torch==2.10.0+cpu torchvision==0.25.0 torchaudio==2.10.0;
4043

4144
RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
4245
source /usr/local/Ascend/nnal/atb/set_env.sh && \
4346
cd vllm-ascend && \
4447
git submodule update --init --recursive && \
4548
pip install -r requirements.txt --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi && \
46-
SOC_VERSION=${SOC_VERSION} pip install -v -e . --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
49+
SOC_VERSION=${SOC_VERSION} pip install -v -e . --no-build-isolation --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
4750

4851
RUN python3 -m pip install --index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
4952
--no-deps torch-npu==2.10.0.post4
@@ -55,7 +58,7 @@ RUN grep -v '^gem-llm' requirements_common.txt > requirements_npu.txt && \
5558
pip install -r requirements_npu.txt && \
5659
rm -f requirements_npu.txt
5760

58-
RUN pip install "transformers==4.57.6" "tensorboard==2.20.0"
61+
RUN pip install "transformers==4.57.6" "tensorboard==2.20.0" "hydra-core==1.3.5" "sympy==1.14.0"
5962

6063
RUN pip install -e .
6164

docker/Dockerfile.A3

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ RUN cd vllm && \
3636
pip cache purge && \
3737
cd ..
3838

39-
RUN pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0
39+
RUN pip install \
40+
--index-url https://download.pytorch.org/whl/cpu \
41+
--extra-index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
42+
torch==2.10.0+cpu torchvision==0.25.0 torchaudio==2.10.0;
4043

4144
RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
4245
source /usr/local/Ascend/nnal/atb/set_env.sh && \
4346
cd vllm-ascend && \
4447
git submodule update --init --recursive && \
4548
pip install -r requirements.txt --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi && \
46-
SOC_VERSION=${SOC_VERSION} pip install -v -e . --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
49+
SOC_VERSION=${SOC_VERSION} pip install -v -e . --no-build-isolation --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
4750

4851
RUN python3 -m pip install --index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
4952
--no-deps torch-npu==2.10.0.post4
@@ -55,7 +58,7 @@ RUN grep -v '^gem-llm' requirements_common.txt > requirements_npu.txt && \
5558
pip install -r requirements_npu.txt && \
5659
rm -f requirements_npu.txt
5760

58-
RUN pip install "transformers==4.57.6" "tensorboard==2.20.0"
61+
RUN pip install "transformers==4.57.6" "tensorboard==2.20.0" "hydra-core==1.3.5" "sympy==1.14.0"
5962

6063
RUN pip install -e .
6164

docs_roll/docs/User Guides/Hardware Support/ascend_usage.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ To use torch and torch_npu in ROLL, install them using the commands below:
5353

5454
```
5555
# Use CPU-only torch when installing outside the pre-built image
56-
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cpu
56+
pip install \
57+
--index-url https://download.pytorch.org/whl/cpu \
58+
--extra-index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
59+
torch==2.10.0+cpu torchvision==0.25.0 torchaudio==2.10.0
5760
5861
# Install the torch_npu version matching torch/CANN
5962
python -m pip install \
@@ -78,7 +81,7 @@ git clone -b v0.23.0rc1 --depth 1 https://github.com/vllm-project/vllm-ascend.gi
7881
cd vllm-ascend
7982
git submodule update --init --recursive
8083
81-
pip install -e . --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
84+
pip install -e . --no-build-isolation --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
8285
cd ..
8386
8487
# Install the Ascend Triton implementation after the other packages

docs_roll/i18n/zh-Hans/docusaurus-plugin-content-docs/current/User Guides/Hardware Support/ascend_usage.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ conda activate roll
5353

5454
```
5555
# 在预构建镜像外手动安装时,使用 CPU 版 torch
56-
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cpu
56+
pip install \
57+
--index-url https://download.pytorch.org/whl/cpu \
58+
--extra-index-url https://mirrors.huaweicloud.com/repository/pypi/simple \
59+
torch==2.10.0+cpu torchvision==0.25.0 torchaudio==2.10.0
5760
5861
# 安装与 torch/CANN 匹配的 torch_npu
5962
python -m pip install \
@@ -78,7 +81,7 @@ git clone -b v0.23.0rc1 --depth 1 https://github.com/vllm-project/vllm-ascend.gi
7881
cd vllm-ascend
7982
git submodule update --init --recursive
8083
81-
pip install -e . --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
84+
pip install -e . --no-build-isolation --extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
8285
cd ..
8386
8487
# 在其他依赖安装完成后安装昇腾 Triton 实现

0 commit comments

Comments
 (0)