Installation Guide¶
This document describes how to install vLLM Ascend manually.
Requirements¶
Environment requirements¶
- Operating system: Linux
- Python: >= 3.10, < 3.13
- Hardware equipped with Ascend NPUs. This guide supports the following devices:
| Type | Common products |
|---|---|
| Atlas A2 Products | Atlas 800T A2, Atlas 900 A2 PoD, Atlas 200T A2 Box16, Atlas 300T A2, Atlas 800I A2, and others |
| Atlas A3 Products | Atlas 800T A3, Atlas 900 A3 SuperPoD, Atlas 9000 A3 SuperPoD, Atlas 800I A3, and others |
| Atlas inference series products | Atlas 300I DUO and Atlas 200I Pro |
| 950DT Products | 950DT |
Hardware and software stack¶
vLLM Ascend runs on a layered hardware and software stack. The following overview shows how the main runtime components fit together.
Hardware and software stack overview
The following hardware and software stack is validated together for this release:
Validated hardware and software stack
| Layer | Component | Validated version / requirement | Role |
|---|---|---|---|
| Runtime environment | Python | 3.12 |
Python version used by the validated release image |
| Host enablement | Ascend HDK | 26.1.1 |
Driver and firmware requirements for the selected CANN release |
| Ascend runtime | CANN Toolkit + Ops | 9.2.1 |
Ascend user-space runtime, including the CANN Toolkit and hardware-specific Ops packages |
| Ascend runtime | NNAL | 9.2.1 |
Provides libatb.so and ATB runtime capabilities |
| Framework | PyTorch | 2.10.0 |
Tensor framework used by vLLM |
| Framework | TorchNPU | 2.10.0.post7 |
Connects PyTorch to the Ascend runtime |
| Kernel acceleration | Triton Ascend | 3.6.0.post2 |
Used on A2, A3, and 950DT Products; not used on Atlas 300I DUO or Atlas 200I Pro |
| Kernel acceleration | FLA NPU | 26.9.1 |
Provides convolution and gated delta-rule operators on A2, A3, and 950DT Products; not required on Atlas 300I DUO or Atlas 200I Pro |
| Inference engine | vLLM | 0.30.0 |
Model inference engine |
| Hardware plugin | vLLM Ascend | 0.30.0 |
Connects vLLM to the Ascend software stack |
The versions and requirements in the table above are validated as one compatibility set. Do not arbitrarily mix versions from different releases.
For another release, select a complete row from Versioning Policy > Release compatibility matrix.
Installation¶
Set up the hardware environment¶
First, run the following command to confirm that the Ascend NPU firmware and driver are installed correctly:
The output should list the expected NPU devices, with Health shown as OK and no driver initialization errors. Device names, chip counts, and table columns vary by hardware and driver version. A missing device or a health status other than OK needs investigation before continuing.
+------------------------------------------------------------------------------------------------+
| npu-smi xx.x.x Version: xx.x.x |
+---------------------------+---------------+----------------------------------------------------+
| NPU Name | Health | Power(W) Temp(C) Hugepages-Usage(page)|
| Chip | Bus-Id | AICore(%) Memory-Usage(MB) HBM-Usage(MB) |
+===========================+===============+====================================================+
| 0 xxxxx | OK | 95.6 50 0 / 0 |
| 0 | 0000:C1:00.0 | 0 0 / 0 xxxx / xxxxx |
+===========================+===============+====================================================+
+---------------------------+---------------+----------------------------------------------------+
| NPU Chip | Process id | Process name | Process memory(MB) |
+===========================+===============+====================================================+
| No running processes found in NPU 0 |
+===========================+===============+====================================================+
The host Linux distribution and kernel must be supported by the selected Ascend hardware and driver/firmware release. For more information, see the Ascend compatibility query and CANN installation resources.
Set up the software environment¶
Choose one complete path based on your requirements. Container-based paths require Docker; see the Docker installation guide if needed.
| Requirement | Recommended method | Intended users |
|---|---|---|
| Get a working vLLM Ascend environment as quickly as possible | Use a prebuilt image | First-time users or users who want a quick deployment |
| Install vLLM Ascend on an existing CANN environment | Install in a CANN environment | Users of a CANN image or a host/container where CANN is already installed |
| Install and manage the complete software stack manually | Install from a base environment | Advanced users who need custom CANN or Python dependencies, development, or debugging |
Components by installation method
Status: ✓ Already available · ○ Installed during this path
| Component | Prebuilt image | CANN environment | Base environment |
|---|---|---|---|
| CANN Toolkit + Ops | ✓ | ✓ | ○ |
| NNAL | ✓ | ✓ | ○ |
| PyTorch + TorchNPU | ✓ | ○ | ○ |
| vLLM + vLLM Ascend | ✓ | ○ | ○ |
| Triton Ascend | ✓ | ○ | ○ |
| FLA NPU (A2 / A3 / 950DT Products) | ✓ | ○ | ○ |
PyTorch and TorchNPU: Installed as dependencies during the Install vLLM and vLLM Ascend step; no separate installation step is required.
FLA NPU: Installed explicitly in the common follow-up step for pip, uv, and source installations on A2, A3, and 950DT Products.
The host needs only a working Ascend driver and firmware, plus Docker. The image includes the CANN user-space environment, PyTorch/TorchNPU, vLLM, and vLLM Ascend.
Choose an official image for the fastest setup, or build an image manually when you need to customize it.
Select your hardware and operating system, then pull the official image, start the container, and verify the environment.
Official vLLM Ascend images
| Image name | Hardware | OS |
|---|---|---|
vllm-ascend:v0.30.0 |
Ascend A2 series products | Ubuntu |
vllm-ascend:v0.30.0-openeuler |
Ascend A2 series products | openEuler |
vllm-ascend:v0.30.0-a3 |
Ascend A3 series products | Ubuntu |
vllm-ascend:v0.30.0-a3-openeuler |
Ascend A3 series products | openEuler |
vllm-ascend:v0.30.0-310p |
Atlas 300I DUO / Atlas 200I Pro | Ubuntu |
vllm-ascend:v0.30.0-310p-openeuler |
Atlas 300I DUO / Atlas 200I Pro | openEuler |
vllm-ascend:v0.30.0-a5 |
950DT Products | Ubuntu |
vllm-ascend:v0.30.0-a5-openeuler |
950DT Products | openEuler |
Pull the image¶
If image downloads are slow
vLLM Ascend images are downloaded from quay.io by default. If direct access is slow, use one of the following registry mirrors to accelerate the download.
For example, the original image address is:
You can replace it with:
# Replace with tag you want to pull
TAG=v0.30.0
# use
docker pull m.daocloud.io/quay.io/ascend/vllm-ascend:$TAG
# or
docker pull quay.nju.edu.cn/ascend/vllm-ascend:$TAG
Replace only the registry prefix and preserve the complete original image tag, including suffixes such as -a3, -310p, -950dt, and -openeuler.
Start the container¶
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Verify the container environment¶
Run the following commands in the container. The container is ready when the output includes vLLM Ascend environment: OK.
Pull the image¶
If image downloads are slow
vLLM Ascend images are downloaded from quay.io by default. If direct access is slow, use one of the following registry mirrors to accelerate the download.
For example, the original image address is:
You can replace it with:
# Replace with tag you want to pull
TAG=v0.30.0
# use
docker pull m.daocloud.io/quay.io/ascend/vllm-ascend:$TAG
# or
docker pull quay.nju.edu.cn/ascend/vllm-ascend:$TAG
Replace only the registry prefix and preserve the complete original image tag, including suffixes such as -a3, -310p, -950dt, and -openeuler.
Start the container¶
A3 container startup requirements
A3 uses a dual-DIE design and requires two Ascend device nodes, such as /dev/davinci0 and /dev/davinci1.
export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE0" \
--device "$DEVICE1" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE0" \
--device "$DEVICE1" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Verify the container environment¶
Run the following commands in the container. The container is ready when the output includes vLLM Ascend environment: OK.
Pull the image¶
If image downloads are slow
vLLM Ascend images are downloaded from quay.io by default. If direct access is slow, use one of the following registry mirrors to accelerate the download.
For example, the original image address is:
You can replace it with:
# Replace with tag you want to pull
TAG=v0.30.0
# use
docker pull m.daocloud.io/quay.io/ascend/vllm-ascend:$TAG
# or
docker pull quay.nju.edu.cn/ascend/vllm-ascend:$TAG
Replace only the registry prefix and preserve the complete original image tag, including suffixes such as -a3, -310p, -950dt, and -openeuler.
Start the container¶
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Verify the container environment¶
Run the following commands in the container. The container is ready when the output includes vLLM Ascend environment: OK.
Pull the image¶
If image downloads are slow
vLLM Ascend images are downloaded from quay.io by default. If direct access is slow, use one of the following registry mirrors to accelerate the download.
For example, the original image address is:
You can replace it with:
# Replace with tag you want to pull
TAG=v0.30.0
# use
docker pull m.daocloud.io/quay.io/ascend/vllm-ascend:$TAG
# or
docker pull quay.nju.edu.cn/ascend/vllm-ascend:$TAG
Replace only the registry prefix and preserve the complete original image tag, including suffixes such as -a3, -310p, -950dt, and -openeuler.
Start the container¶
Atlas 200I Pro container startup requirements
Atlas 200I Pro requires additional device nodes, driver libraries, and host configuration files. Before starting the container, make sure that all host paths mounted by the command below exist.
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--privileged \
--name vllm-ascend \
--shm-size=10g \
--device=/dev/davinci0:/dev/davinci0 \
--device=/dev/davinci_manager \
--device=/dev/ascend_manager \
--device=/dev/user_config \
-v /etc/sys_version.conf:/etc/sys_version.conf \
-v /etc/ld.so.conf.d/mind_so.conf:/etc/ld.so.conf.d/mind_so.conf \
-v /etc/hdcBasic.cfg:/etc/hdcBasic.cfg \
-v /var/dmp_daemon:/var/dmp_daemon \
-v /usr/lib64/libmmpa.so:/usr/lib64/libmmpa.so \
-v /usr/lib64/libcrypto.so.1.1:/usr/lib64/libcrypto.so.1.1 \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /usr/lib64/libstackcore.so:/usr/lib64/libstackcore.so \
-v /usr/lib/aarch64-linux-gnu/libyaml-0.so.2:/usr/lib64/libyaml-0.so.2 \
-v /etc/slog.conf:/etc/slog.conf \
-v /var/slogd:/var/slogd \
-v /usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64 \
-v /usr/lib64/libtensorflow.so:/usr/lib64/libtensorflow.so \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--privileged \
--name vllm-ascend \
--shm-size=10g \
--device=/dev/davinci0:/dev/davinci0 \
--device=/dev/davinci_manager \
--device=/dev/ascend_manager \
--device=/dev/user_config \
-v /etc/sys_version.conf:/etc/sys_version.conf \
-v /etc/ld.so.conf.d/mind_so.conf:/etc/ld.so.conf.d/mind_so.conf \
-v /etc/hdcBasic.cfg:/etc/hdcBasic.cfg \
-v /var/dmp_daemon:/var/dmp_daemon \
-v /usr/lib64/libsemanage.so.2:/usr/lib64/libsemanage.so.2 \
-v /usr/lib64/libmmpa.so:/usr/lib64/libmmpa.so \
-v /usr/lib64/libcrypto.so.1.1:/usr/lib64/libcrypto.so.1.1 \
-v /usr/lib64/libyaml-0.so.2.0.9:/usr/lib64/libyaml-0.so.2 \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /usr/lib64/libstackcore.so:/usr/lib64/libstackcore.so \
-v /etc/slog.conf:/etc/slog.conf \
-v /var/slogd:/var/slogd \
-v /usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64 \
-v /usr/lib64/libtensorflow.so:/usr/lib64/libtensorflow.so \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Verify the container environment¶
Run the following commands in the container. The container is ready when the output includes vLLM Ascend environment: OK.
Pull the image¶
If image downloads are slow
vLLM Ascend images are downloaded from quay.io by default. If direct access is slow, use one of the following registry mirrors to accelerate the download.
For example, the original image address is:
You can replace it with:
# Replace with tag you want to pull
TAG=v0.30.0
# use
docker pull m.daocloud.io/quay.io/ascend/vllm-ascend:$TAG
# or
docker pull quay.nju.edu.cn/ascend/vllm-ascend:$TAG
Replace only the registry prefix and preserve the complete original image tag, including suffixes such as -a3, -310p, -950dt, and -openeuler.
Start the container¶
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--net=host \
--shm-size=1g \
--device /dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/ummu \
--device /dev/uburma \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-it "$IMAGE" bash
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend \
--net=host \
--shm-size=1g \
--device /dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/ummu \
--device /dev/uburma \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-it "$IMAGE" bash
Verify the container environment¶
Run the following commands in the container. The container is ready when the output includes vLLM Ascend environment: OK.
Run the command for your hardware and operating system:
This path applies to an official CANN base image or to CANN that is already installed on the host or in an existing container.
Prepare the CANN environment¶
Recommended CANN base images
| Hardware | Ubuntu | openEuler |
|---|---|---|
| Ascend A2 series products | quay.io/ascend/cann:9.2.1-910b-ubuntu22.04-py3.12 |
quay.io/ascend/cann:9.2.1-910b-openeuler24.03-py3.12 |
| Ascend A3 series products | quay.io/ascend/cann:9.2.1-a3-ubuntu22.04-py3.12 |
quay.io/ascend/cann:9.2.1-a3-openeuler24.03-py3.12 |
| Atlas 300I DUO | quay.io/ascend/cann:9.2.1-310p-ubuntu22.04-py3.12 |
quay.io/ascend/cann:9.2.1-310p-openeuler24.03-py3.12 |
| Atlas 200I Pro | quay.io/ascend/cann:9.2.1-310p-ubuntu22.04-py3.12 |
quay.io/ascend/cann:9.2.1-310p-openeuler24.03-py3.12 |
| 950DT Products | quay.io/ascend/cann:9.2.1-950-ubuntu22.04-py3.12 |
quay.io/ascend/cann:9.2.1-950-openeuler24.03-py3.12 |
The CANN base image already includes the Toolkit, the operator package for the target hardware, and NNAL. You do not need to reinstall CANN in the container. For other operating systems and tags, see the CANN Container Images Overview.
Select your hardware and operating system, then start the CANN container:
Pull the image¶
Start the container¶
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Pull the image¶
Start the container¶
A3 container startup requirements
A3 uses a dual-DIE design and requires two Ascend device nodes, such as /dev/davinci0 and /dev/davinci1.
export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE0" \
--device "$DEVICE1" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE0" \
--device "$DEVICE1" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Pull the image¶
Start the container¶
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--shm-size=1g \
--device "$DEVICE" \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Pull the image¶
Start the container¶
Atlas 200I Pro container startup requirements
Atlas 200I Pro requires additional device nodes, driver libraries, and host configuration files. Before starting the container, make sure that all host paths mounted by the command below exist.
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--privileged \
--name vllm-ascend-cann \
--shm-size=10g \
--device=/dev/davinci0:/dev/davinci0 \
--device=/dev/davinci_manager \
--device=/dev/ascend_manager \
--device=/dev/user_config \
-v /etc/sys_version.conf:/etc/sys_version.conf \
-v /etc/ld.so.conf.d/mind_so.conf:/etc/ld.so.conf.d/mind_so.conf \
-v /etc/hdcBasic.cfg:/etc/hdcBasic.cfg \
-v /var/dmp_daemon:/var/dmp_daemon \
-v /usr/lib64/libmmpa.so:/usr/lib64/libmmpa.so \
-v /usr/lib64/libcrypto.so.1.1:/usr/lib64/libcrypto.so.1.1 \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /usr/lib64/libstackcore.so:/usr/lib64/libstackcore.so \
-v /usr/lib/aarch64-linux-gnu/libyaml-0.so.2:/usr/lib64/libyaml-0.so.2 \
-v /etc/slog.conf:/etc/slog.conf \
-v /var/slogd:/var/slogd \
-v /usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64 \
-v /usr/lib64/libtensorflow.so:/usr/lib64/libtensorflow.so \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--privileged \
--name vllm-ascend-cann \
--shm-size=10g \
--device=/dev/davinci0:/dev/davinci0 \
--device=/dev/davinci_manager \
--device=/dev/ascend_manager \
--device=/dev/user_config \
-v /etc/sys_version.conf:/etc/sys_version.conf \
-v /etc/ld.so.conf.d/mind_so.conf:/etc/ld.so.conf.d/mind_so.conf \
-v /etc/hdcBasic.cfg:/etc/hdcBasic.cfg \
-v /var/dmp_daemon:/var/dmp_daemon \
-v /usr/lib64/libsemanage.so.2:/usr/lib64/libsemanage.so.2 \
-v /usr/lib64/libmmpa.so:/usr/lib64/libmmpa.so \
-v /usr/lib64/libcrypto.so.1.1:/usr/lib64/libcrypto.so.1.1 \
-v /usr/lib64/libyaml-0.so.2.0.9:/usr/lib64/libyaml-0.so.2 \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /usr/lib64/libstackcore.so:/usr/lib64/libstackcore.so \
-v /etc/slog.conf:/etc/slog.conf \
-v /var/slogd:/var/slogd \
-v /usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64 \
-v /usr/lib64/libtensorflow.so:/usr/lib64/libtensorflow.so \
-v "$MODEL_CACHE:/root/.cache" \
-p 8000:8000 \
-it "$IMAGE" bash
Pull the image¶
Start the container¶
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--net=host \
--shm-size=1g \
--device /dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/ummu \
--device /dev/uburma \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-it "$IMAGE" bash
export MODEL_CACHE="${HOME}/.cache"
mkdir -p "$MODEL_CACHE"
docker run --rm \
--name vllm-ascend-cann \
--net=host \
--shm-size=1g \
--device /dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/ummu \
--device /dev/uburma \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v "$MODEL_CACHE:/root/.cache" \
-it "$IMAGE" bash
Verify the NNAL environment
Confirm that /usr/local/Ascend/nnal/atb/set_env.sh and libatb.so are available. If CANN is installed elsewhere, source the corresponding set_env.sh. If a "libatb.so not found" error occurs at runtime, make sure that the manual installation steps installed NNAL correctly.
Install vLLM and vLLM Ascend¶
First, install the system dependencies for the container operating system and configure the pip mirror.
For Ubuntu:
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
apt-get update -y && apt-get install -y gcc g++ cmake ninja-build libnuma-dev wget git curl jq
pip config set global.index-url "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
For openEuler:
yum update -y && yum install -y gcc g++ cmake ninja-build numactl-devel wget git curl jq patch
pip config set global.index-url "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
Choose one of the following methods to install vllm and vllm-ascend. PyTorch and TorchNPU are installed automatically as dependencies during this step using the compatible versions for the selected release.
Installation method comparison
| Method | Package type | Hardware handling | Recommended for |
|---|---|---|---|
| pip | vLLM built from source; prebuilt vLLM Ascend wheel | Installs the standard vllm-ascend wheel, which currently targets A2 |
A2 users who want the simplest installation |
| uv | Prebuilt wheel | Uses WheelNext wheel variants to select a compatible build for the detected hardware | Users who want a prebuilt wheel selected for their hardware |
| Source | Source code | Builds and installs vLLM Ascend for the current environment | Development, customization, or environments without a suitable prebuilt wheel |
This installation method currently supports only A2 builds and does not automatically support A3, Atlas 300I DUO, Atlas 200I Pro, or 950DT Products. For other hardware, use a prebuilt image, WheelNext, or a source installation.
VLLM_TARGET_DEVICE=empty \
VLLM_VERSION_OVERRIDE=0.30.0 \
pip install -v --no-binary vllm "vllm==0.30.0" \
--extra-index-url https://download.pytorch.org/whl/cpu/
pip install \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"vllm-ascend==0.30.0"
If pip cannot verify the Huawei Cloud mirror certificate
The Huawei Cloud package index uses HTTPS, so --trusted-host is not normally required. If pip reports an SSL certificate verification or untrusted-host error for mirrors.huaweicloud.com, first update pip and the operating system CA certificates, or configure the CA bundle required by your network.
As a temporary workaround on a trusted network, retry the vLLM Ascend installation command with --trusted-host mirrors.huaweicloud.com.
This option tells pip to trust the host even when HTTPS validation fails, which weakens protection against man-in-the-middle attacks. Use it only when you trust the network and cannot fix the certificate configuration.
Check the device build type:
WheelNext selects a vLLM Ascend wheel that matches the hardware from the variant index. First, install and verify uv:
# install uv-wheelnext
curl -LsSf https://astral.sh/uv/install.sh | sed 's/verify_checksum "$_file"/true/' | INSTALLER_DOWNLOAD_URL=https://wheelnext.astral.sh sh
source $HOME/.local/bin/env
# Install vllm-project/vllm. The newest supported version is v0.30.0.
pip install "vllm==0.30.0"
# Install vllm-project/vllm-ascend from wheelnext index.
uv pip install --system \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/variant \
--index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple \
--find-links https://mirrors.huaweicloud.com/ascend/repos/pypi/triton-ascend/ \
"vllm-ascend==0.30.0"
Clear the cache if uv installation fails
If uv pip install fails because of a corrupted cache or stale package data, clear the uv cache before running the installation command again:
uv cache clean
Check the device build type:
A3 source installation
When installing vLLM Ascend from source for A3, run git submodule update --init --recursive manually or make sure that the environment has internet access so the required submodules can be downloaded automatically.
Install vLLM first, then install vLLM Ascend:
# Install vLLM.
git clone --depth 1 --branch v0.30.0 https://github.com/vllm-project/vllm
cd vllm
VLLM_TARGET_DEVICE=empty pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/
cd ..
# Install vLLM Ascend.
git clone --depth 1 --branch v0.30.0 https://github.com/vllm-project/vllm-ascend.git
cd vllm-ascend
# git submodule update --init --recursive
pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/nightly
cd ..
Reinstalling after a CANN version change
If you upgrade or downgrade CANN and encounter compatibility issues, consider performing a clean rebuild of vLLM Ascend to avoid reusing build artifacts or caches from the previous CANN environment.
Run the following commands from the vLLM Ascend repository root after configuring the selected CANN environment:
# Remove previous build artifacts and caches.
rm -rf csrc/build csrc/build_out csrc/build_cache build
# Rebuild custom kernels and reinstall vLLM Ascend.
pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/nightly
Note: If VLLM_ASCEND_BUILD_CACHE_DIR is set, the build cache
is stored in the specified directory instead of csrc/build_cache.
Clear the custom cache separately after verifying it is safe to
remove, especially if it is shared by other builds.
After completing any of the three installation methods, install the kernel packages for your hardware in the same Python environment:
Reinstall the matching Triton Ascend version, then install FLA NPU. FLA NPU is required during worker initialization on these devices and is not installed automatically with vllm-ascend.
The following example installs FLA NPU for A2:
pip uninstall -y triton triton-ascend
pip install \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"triton-ascend===3.6.0.post2"
pip install --no-deps \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"flash-linear-attention-npu-a2==26.9.1"
FLA NPU packages
For A3, replace flash-linear-attention-npu-a2 with flash-linear-attention-npu-a3. For 950DT Products (A5), use flash-linear-attention-npu-a5 instead. Keep the same version; pip selects the wheel for your host architecture automatically.
These packages require glibc 2.34 or later and a libstdc++ runtime providing GLIBCXX_3.4.29.
Can community Triton and Triton Ascend coexist?
For Triton Ascend 3.2.0 and earlier, uninstall community Triton before installing Triton Ascend.
For Triton Ascend 3.2.1 and later, installing Triton Ascend first installs the required community Triton package and then provides its Ascend-specific implementation over the shared installation paths. If Triton is reinstalled or upgraded afterward, it may overwrite the Triton Ascend files. In that case, uninstall both packages and reinstall Triton Ascend.
For more Triton Ascend installation guidance, see Triton-Ascend > FAQ.
When installing another version of vllm-ascend, check the repository's requirements.txt for the corresponding triton-ascend version.
This path is intended for advanced users who need to manage the user-space software stack themselves. You can install on an existing Linux host or start from a minimal Linux container.
Install CANN manually¶
The official CANN Installation Resources are the authoritative installation reference.
The example commands are for A2 only
The commands below are for reference and install 910B Ops, which applies only to A2. For other hardware, including 950DT Products, use the matching Ops package according to the official guide.
The commands below use the default CANN and NNAL installation paths. If you install either component in a non-default directory, source the corresponding set_env.sh from the actual installation directory.
Code
# Create a virtual environment.
python -m venv vllm-ascend-env
source vllm-ascend-env/bin/activate
# Install required Python packages.
python -m pip install --upgrade pip
pip3 install attrs numpy decorator sympy cffi pyyaml pathlib2 psutil protobuf scipy requests absl-py wheel typing_extensions
# Download and install the CANN package.
wget --header="Referer: https://www.hiascend.com/" https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%209.2.1/Ascend-cann-toolkit_9.2.1_linux-"$(uname -i)".run
chmod +x ./Ascend-cann-toolkit_9.2.1_linux-"$(uname -i)".run
./Ascend-cann-toolkit_9.2.1_linux-"$(uname -i)".run --full
source /usr/local/Ascend/ascend-toolkit/set_env.sh
export ASCEND_TOOLKIT_HOME="${ASCEND_TOOLKIT_HOME:-/usr/local/Ascend/ascend-toolkit/latest}"
wget --header="Referer: https://www.hiascend.com/" https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%209.2.1/Ascend-cann-910b-ops_9.2.1_linux-"$(uname -i)".run
chmod +x ./Ascend-cann-910b-ops_9.2.1_linux-"$(uname -i)".run
./Ascend-cann-910b-ops_9.2.1_linux-"$(uname -i)".run --install
wget --header="Referer: https://www.hiascend.com/" https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%209.2.1/Ascend-cann-nnal_9.2.1_linux-"$(uname -i)".run
chmod +x ./Ascend-cann-nnal_9.2.1_linux-"$(uname -i)".run
./Ascend-cann-nnal_9.2.1_linux-"$(uname -i)".run --install
source /usr/local/Ascend/nnal/atb/set_env.sh
Install vLLM and vLLM Ascend¶
First, install the system dependencies for the container operating system and configure the pip mirror.
For Ubuntu:
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
apt-get update -y && apt-get install -y gcc g++ cmake ninja-build libnuma-dev wget git curl jq
pip config set global.index-url "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
For openEuler:
yum update -y && yum install -y gcc g++ cmake ninja-build numactl-devel wget git curl jq patch
pip config set global.index-url "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
Choose one of the following methods to install vllm and vllm-ascend. PyTorch and TorchNPU are installed automatically as dependencies during this step using the compatible versions for the selected release.
Installation method comparison
| Method | Package type | Hardware handling | Recommended for |
|---|---|---|---|
| pip | vLLM built from source; prebuilt vLLM Ascend wheel | Installs the standard vllm-ascend wheel, which currently targets A2 |
A2 users who want the simplest installation |
| uv | Prebuilt wheel | Uses WheelNext wheel variants to select a compatible build for the detected hardware | Users who want a prebuilt wheel selected for their hardware |
| Source | Source code | Builds and installs vLLM Ascend for the current environment | Development, customization, or environments without a suitable prebuilt wheel |
This installation method currently supports only A2 builds and does not automatically support A3, Atlas 300I DUO, Atlas 200I Pro, or 950DT Products. For other hardware, use a prebuilt image, WheelNext, or a source installation.
VLLM_TARGET_DEVICE=empty \
VLLM_VERSION_OVERRIDE=0.30.0 \
pip install -v --no-binary vllm "vllm==0.30.0" \
--extra-index-url https://download.pytorch.org/whl/cpu/
pip install \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"vllm-ascend==0.30.0"
If pip cannot verify the Huawei Cloud mirror certificate
The Huawei Cloud package index uses HTTPS, so --trusted-host is not normally required. If pip reports an SSL certificate verification or untrusted-host error for mirrors.huaweicloud.com, first update pip and the operating system CA certificates, or configure the CA bundle required by your network.
As a temporary workaround on a trusted network, retry the vLLM Ascend installation command with --trusted-host mirrors.huaweicloud.com.
This option tells pip to trust the host even when HTTPS validation fails, which weakens protection against man-in-the-middle attacks. Use it only when you trust the network and cannot fix the certificate configuration.
Check the device build type:
WheelNext selects a vLLM Ascend wheel that matches the hardware from the variant index. First, install and verify uv:
# install uv-wheelnext
curl -LsSf https://astral.sh/uv/install.sh | sed 's/verify_checksum "$_file"/true/' | INSTALLER_DOWNLOAD_URL=https://wheelnext.astral.sh sh
source $HOME/.local/bin/env
# Install vllm-project/vllm. The newest supported version is v0.30.0.
pip install "vllm==0.30.0"
# Install vllm-project/vllm-ascend from wheelnext index.
uv pip install --system \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/variant \
--index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple \
--find-links https://mirrors.huaweicloud.com/ascend/repos/pypi/triton-ascend/ \
"vllm-ascend==0.30.0"
Clear the cache if uv installation fails
If uv pip install fails because of a corrupted cache or stale package data, clear the uv cache before running the installation command again:
uv cache clean
Check the device build type:
A3 source installation
When installing vLLM Ascend from source for A3, run git submodule update --init --recursive manually or make sure that the environment has internet access so the required submodules can be downloaded automatically.
Install vLLM first, then install vLLM Ascend:
# Install vLLM.
git clone --depth 1 --branch v0.30.0 https://github.com/vllm-project/vllm
cd vllm
VLLM_TARGET_DEVICE=empty pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/
cd ..
# Install vLLM Ascend.
git clone --depth 1 --branch v0.30.0 https://github.com/vllm-project/vllm-ascend.git
cd vllm-ascend
# git submodule update --init --recursive
pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/nightly
cd ..
Reinstalling after a CANN version change
If you upgrade or downgrade CANN and encounter compatibility issues, consider performing a clean rebuild of vLLM Ascend to avoid reusing build artifacts or caches from the previous CANN environment.
Run the following commands from the vLLM Ascend repository root after configuring the selected CANN environment:
# Remove previous build artifacts and caches.
rm -rf csrc/build csrc/build_out csrc/build_cache build
# Rebuild custom kernels and reinstall vLLM Ascend.
pip install -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/ \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi/nightly
Note: If VLLM_ASCEND_BUILD_CACHE_DIR is set, the build cache
is stored in the specified directory instead of csrc/build_cache.
Clear the custom cache separately after verifying it is safe to
remove, especially if it is shared by other builds.
After completing any of the three installation methods, install the kernel packages for your hardware in the same Python environment:
Reinstall the matching Triton Ascend version, then install FLA NPU. FLA NPU is required during worker initialization on these devices and is not installed automatically with vllm-ascend.
The following example installs FLA NPU for A2:
pip uninstall -y triton triton-ascend
pip install \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"triton-ascend===3.6.0.post2"
pip install --no-deps \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi \
"flash-linear-attention-npu-a2==26.9.1"
FLA NPU packages
For A3, replace flash-linear-attention-npu-a2 with flash-linear-attention-npu-a3. For 950DT Products (A5), use flash-linear-attention-npu-a5 instead. Keep the same version; pip selects the wheel for your host architecture automatically.
These packages require glibc 2.34 or later and a libstdc++ runtime providing GLIBCXX_3.4.29.
Can community Triton and Triton Ascend coexist?
For Triton Ascend 3.2.0 and earlier, uninstall community Triton before installing Triton Ascend.
For Triton Ascend 3.2.1 and later, installing Triton Ascend first installs the required community Triton package and then provides its Ascend-specific implementation over the shared installation paths. If Triton is reinstalled or upgraded afterward, it may overwrite the Triton Ascend files. In that case, uninstall both packages and reinstall Triton Ascend.
For more Triton Ascend installation guidance, see Triton-Ascend > FAQ.
When installing another version of vllm-ascend, check the repository's requirements.txt for the corresponding triton-ascend version.
Verify the installation¶
Go to Quick Start > Inference and run a simple inference test to verify the installation.
Additional guides¶
CPU-only build verification¶
Use this workflow on the main branch to check Python package construction and editable installation without an NPU. It skips native extensions and custom kernels, so it does not require CANN, an Ascend driver, PyTorch, TorchNPU, or vLLM. It does not provide CPU inference or an environment for running the unit tests.
Use Linux (x86_64 or aarch64), Git, and Python >= 3.10, < 3.13 with venv support. For an isolated check, you can start a disposable Python container without device mappings or driver mounts:
docker run --rm -it --name vllm-ascend-build-check \
python:3.12-slim bash -c \
'apt-get update && apt-get install -y --no-install-recommends git && exec bash'
Run the remaining commands inside the container. Get the source and create a dedicated virtual environment. If you already have a main-branch checkout in your chosen environment, start from that repository's root instead of cloning again:
git clone --depth 1 --branch main https://github.com/vllm-project/vllm-ascend.git
cd vllm-ascend
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip "setuptools>=64" "setuptools-scm>=8" wheel
Build and install the Python package:
# Skip custom-kernel compilation and record A2 as the package target.
COMPILE_CUSTOM_KERNELS=0 SOC_VERSION=ascend910b1 \
python -m pip install --no-build-isolation --no-deps -e .
COMPILE_CUSTOM_KERNELS=0skips building the native extensions and custom operators. These components are enabled by default for a normal NPU installation.SOC_VERSIONsupplies the package's target hardware without queryingnpu-smi. Useascend910b1for A2,ascend910_9391for A3,ascend310p1for Atlas 300I DUO / Atlas 200I Pro, orascend950dt_9582for 950DT Products. This selects build metadata; it does not emulate an NPU.--no-build-isolationuses the packaging tools installed in this virtual environment instead of installing the fullpyproject.tomlbuild requirements.--no-depsskips runtime dependencies fromrequirements.txt. Do not install those dependencies for this packaging-only check.
The variable assignments apply only to the installation command, so they do not disable custom-kernel compilation in a later shell command.
Verify the installed package metadata without importing the NPU runtime:
python - <<'PY'
from importlib.metadata import distribution
package = distribution("vllm-ascend")
print(f"{package.metadata['Name']} {package.version}")
print("CPU-only package build: OK")
PY
The installation command must finish successfully and the metadata check must print CPU-only package build: OK. This verifies packaging only. Runtime dependencies are intentionally absent, so python -m pip check will report missing dependencies in this environment; importing runtime modules or running inference is not a success criterion here.
For CPU unit tests, prepare a separate environment using Testing > Set up a test environment. When developing against main, install the exact vLLM commit recorded in .github/vllm-main-verified.commit; Contributing > Run CI locally provides the checkout and installation commands.
Exit the disposable container when finished; --rm removes it and the files created inside it.
Multi-node deployment¶
Check the physical links, the status of each node, and inter-node connectivity in order.
The commands below use hccn_tool (Huawei Collective Communications Network Tool), the Ascend NPU cluster network management tool installed with the driver. if the command is missing, check the driver installation and executable path.
Physical link requirements¶
- The physical machines must be on the same LAN and able to communicate with each other.
- All NPUs must be connected through optical modules, and all connections must be healthy.
950DT Products server precheck
This precheck applies only to 950DT Products servers. Other server series can skip it.
Prepare the HiXLEP configuration paths:
- When deploying a 950DT Products inference service, confirm on each server that
/lib/route.conf,/etc/hccl_rootinfo.json, and the/etc/hixlepdirectory that describes the UB link topology exist and are configured correctly. If any item is missing or misconfigured, follow the HiXLEP configuration file generation guide to generate the required content. Select the "D2D scenario" when generating/etc/hixlep.
Check each node¶
Run the following commands on each node in order:
-link -gshould reportlink status: UP.-net_health -gshould reportnet health status: Success.- LLDP, network detection, gateway, and configuration queries print their respective settings. Check these against your cluster's network configuration; they do not all print a
successmessage.
# Check the remote switch ports
for i in {0..7}; do hccn_tool -i $i -lldp -g | grep Ifname; done
# Get the link status of the Ethernet ports (UP or DOWN)
for i in {0..7}; do hccn_tool -i $i -link -g ; done
# Check the network health status
for i in {0..7}; do hccn_tool -i $i -net_health -g ; done
# View the network detected IP configuration
for i in {0..7}; do hccn_tool -i $i -netdetect -g ; done
# View gateway configuration
for i in {0..7}; do hccn_tool -i $i -gateway -g ; done
# View NPU network configuration
cat /etc/hccn.conf
# Check the remote switch ports
for i in {0..15}; do hccn_tool -i $i -lldp -g | grep Ifname; done
# Get the link status of the Ethernet ports (UP or DOWN)
for i in {0..15}; do hccn_tool -i $i -link -g ; done
# Check the network health status
for i in {0..15}; do hccn_tool -i $i -net_health -g ; done
# View the network detected IP configuration
for i in {0..15}; do hccn_tool -i $i -netdetect -g ; done
# View gateway configuration
for i in {0..15}; do hccn_tool -i $i -gateway -g ; done
# View NPU network configuration
cat /etc/hccn.conf
950DT Products connect NPUs over UB instead of RoCE. The RoCE-oriented hccn_tool
subcommands used on A2 and A3 (-lldp, -ip, -gateway, -net_health, -ping)
reject the -i <dev> -<cmd> -g argument order on this product, and some of them are
not supported at all (Unsupported operation: The command is not supported on this
product). Use the UB-oriented checks below instead.
# Show the UB port matrix of each NPU (UDie, port, speed, link status)
for i in {0..7}; do hccn_tool -g -dev_info -i $i; done
# Get the link status of individual UB ports (UP or DOWN)
# -u selects the UDie and -p the port; see dev_info above for valid values
for i in {0..7}; do for u in 0 1; do for p in {0..7}; do
hccn_tool -g -link -i $i -u $u -p $p
done; done; done
# Check the driver and firmware version of the NPU network
hccn_tool -g -version -i 0
# List the UB endpoints, their EIDs and link state
urma_admin show
# View NPU network configuration
cat /etc/hccn.conf
Verify inter-node connectivity¶
Obtain NPU addresses¶
Run a cross-node ping test¶
A2 and A3 Products address the peer NPU by IPv4. 950DT Products connect the NPUs over UB and address them by UB EID instead; run urma_admin show on the peer node to obtain its EIDs.
On the source node, use a local NPU device ID and an NPU IP address obtained from the other node. The destination is the remote NPU's network address, not the host's management IP:
On the source node, use a local NPU device ID and an NPU IP address obtained from the other node. The destination is the remote NPU's network address, not the host's management IP:
A UB EID is a 128-bit endpoint identifier written as eight hexadecimal groups, and
each NPU exposes several of them. The EID after -I is a local EID of the source
node, and the argument is the EID of the remote node, both taken from the ACTIVE
rows of urma_admin show on the respective node:
This requires a working UB stack on both nodes: urma_admin show topo must return the
fabric topology built from /etc/hixlep, /lib/route.conf and
/etc/hccl_rootinfo.json. If it reports Failed to recv netlink msg, ret=-1 or
Failed to get ubagg topo, ret:-1, the UB stack is not ready and urma_ping cannot
send any packet.
Successful output includes received replies and a summary with equal transmitted/received packet counts and zero packet loss. For A2 and A3 Products (hccn_tool), for example:
urma_ping reports the same counters in its own N packets transmitted, N received, 0% packet loss summary.
Repeat for the NPU pairs used by your deployment in both directions. Missing replies or packet loss require checking the links, the NPU IP addresses (A2/A3 Products) or EIDs (950DT Products), and the network configuration. This checks basic connectivity; it does not replace a distributed inference test.
Start containers on each node¶
-
Use the official vLLM Ascend containers described in Quick Start > Installation to quickly prepare consistent multi-node runtime environments.
-
Commands for multi-node model serving are outside the scope of this installation guide. Continue with the relevant Feature Tutorial or Model Tutorial.