
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The plugin is a deep learning adaptation framework based on Atlas, enabling Atlas NPUs to support the PyTorch framework and providing users of the PyTorch framework with the powerful computing power of Atlas AI processors.
TorchNPU is maintained by the https://www.hiascend.com/developer/software/ai-frameworks/pytorch
Where to get help
Tags follow the format:
text<TorchNPU_version>-<CANN_version>-<chip>-<os>-<python_version>
| Field | value | Description |
|---|---|---|
| TorchNPU Version | 2.12.0 | For details, see the version notes in the readme. |
| CANN_version | 9.1.0 | For details, see the version notes in the readme. |
| Chip | Specific example values can be found in the CANN mirror | chip model identifier |
| OS | ubuntu22.04 / openeuler24.03 | OS distribution used for the base image |
| Python Version | py3.12 | Major Python version pre-installed in the image |
2.13.0rc1-cann9.1.0-310p-ubuntu22.04-py3.122.13.0rc1-cann9.1.0-310p-openeuler24.03-py3.122.13.0rc1-cann9.1.0-910b-ubuntu22.04-py3.122.13.0rc1-cann9.1.0-910b-openeuler24.03-py3.122.13.0rc1-cann9.1.0-a3-ubuntu22.04-py3.122.13.0rc1-cann9.1.0-a3-openeuler24.03-py3.122.13.0rc1-cann9.1.0-950-ubuntu22.04-py3.122.13.0rc1-cann9.1.0-950-openeuler24.03-py3.12As shown below are all the image tags of the latest 26.1.1 version released by TorchNPU. For all the historical versions, please refer to Supported Tags
2.12.0.post2-cann9.1.0-310p-ubuntu22.04-py3.122.12.0.post2-cann9.1.0-310p-openeuler24.03-py3.122.12.0.post2-cann9.1.0-910b-ubuntu22.04-py3.122.12.0.post2-cann9.1.0-910b-openeuler24.03-py3.122.12.0.post2-cann9.1.0-a3-ubuntu22.04-py3.122.12.0.post2-cann9.1.0-a3-openeuler24.03-py3.122.12.0.post2-cann9.1.0-950-ubuntu22.04-py3.122.12.0.post2-cann9.1.0-950-openeuler24.03-py3.122.11.0.post2-cann9.1.0-310p-ubuntu22.04-py3.122.11.0.post2-cann9.1.0-310p-openeuler24.03-py3.122.11.0.post2-cann9.1.0-910b-ubuntu22.04-py3.122.11.0.post2-cann9.1.0-910b-openeuler24.03-py3.122.11.0.post2-cann9.1.0-a3-ubuntu22.04-py3.122.11.0.post2-cann9.1.0-a3-openeuler24.03-py3.122.11.0.post2-cann9.1.0-950-ubuntu22.04-py3.122.11.0.post2-cann9.1.0-950-openeuler24.03-py3.122.10.0.post6-cann9.1.0-310p-ubuntu22.04-py3.122.10.0.post6-cann9.1.0-310p-openeuler24.03-py3.122.10.0.post6-cann9.1.0-910b-ubuntu22.04-py3.122.10.0.post6-cann9.1.0-910b-openeuler24.03-py3.122.10.0.post6-cann9.1.0-a3-ubuntu22.04-py3.122.10.0.post6-cann9.1.0-a3-openeuler24.03-py3.122.10.0.post6-cann9.1.0-950-ubuntu22.04-py3.122.10.0.post6-cann9.1.0-950-openeuler24.03-py3.122.9.0.post8-cann9.1.0-310p-ubuntu22.04-py3.122.9.0.post8-cann9.1.0-310p-openeuler24.03-py3.122.9.0.post8-cann9.1.0-910b-ubuntu22.04-py3.122.9.0.post8-cann9.1.0-910b-openeuler24.03-py3.122.9.0.post8-cann9.1.0-a3-ubuntu22.04-py3.122.9.0.post8-cann9.1.0-a3-openeuler24.03-py3.122.9.0.post8-cann9.1.0-950-ubuntu22.04-py3.122.9.0.post8-cann9.1.0-950-openeuler24.03-py3.122.7.1.post10-cann9.1.0-310p-ubuntu22.04-py3.122.7.1.post10-cann9.1.0-310p-openeuler24.03-py3.122.7.1.post10-cann9.1.0-910b-ubuntu22.04-py3.122.7.1.post10-cann9.1.0-910b-openeuler24.03-py3.122.7.1.post10-cann9.1.0-a3-ubuntu22.04-py3.122.7.1.post10-cann9.1.0-a3-openeuler24.03-py3.122.7.1.post10-cann9.1.0-950-ubuntu22.04-py3.122.7.1.post10-cann9.1.0-950-openeuler24.03-py3.12See dockerfile:dockerfile
| parameters | Description | Required | Reference Source | Value |
|---|---|---|---|---|
| TORCH_VERSION | Full TorchNPU version number | Yes | TorchNPU repo releases | 2.12.0.post2 |
| CHIP_ARCH | chip architecture identifier | Yes | CANN image tag rules | Specific example values can be found in the CANN mirror |
| OS | Base image operating system | Yes | CANN image tag rules | ubuntu / openeuler |
| OS_VERSION | Operating system version | Yes | CANN image tag rules | 22.04 / 24.03 |
| PY_VERSION | Python version pre-installed in base image | Yes | CANN image tag rules | 3.11 |
| CANN_VERSION | CANN toolkit version | Yes | CANN base image repo | 9.1.0 |
| ARCH | Host hardware architecture | Yes | Environment hardware | arm / x86 |
| PY_TAG | Python package ABI tag (cp + version number) | Yes | Strictly match PY_VERSION | cp311 |
| TORCH_NPU_RELEASE_VERSION | Official TorchNPU release tag (including PyTorch version) | Yes | TorchNPU repo releases | v26.1.1-pytorch2.12.0.post2 |
| TORCH_NPU_PATCH_TAG | TorchNPU version number in the release package name | Yes | TorchNPU repo releases | 2.12.0.post2 |
| MANYLINUX_VER | PyPI package compatible system version | No | torch official wheel spec | manylinux_2_28 |
| PIP_MIRROR_URL | pip installation source URL (Tsinghua mirror by default) | No | PyPI mirror sources | https://pypi.tuna.tsinghua.edu.cn/simple |
Image tags, operating systems, and version information:https://quay.io/repository/ascend/cann?tab=tags tag
TORCH_NPU_RELEASE_VERSION and TORCH_NPU_PATCH_TAG parameter values are from TorchNPU Official Release Versions. Example with a wheel download URL:
[***]
download/ and /torch_npu-, e.g. v26.1.1-pytorch2.12.0.torch_npu- and -cp310, e.g. 2.12.0.post2.Taking the construction of the 2.12.0.post2-a3-ubuntu22.04-py3.12 image as an example:
bashdocker build \ --build-arg CHIP_ARCH=a3 \ --build-arg OS=ubuntu \ --build-arg OS_VERSION=22.04 \ --build-arg PY_VERSION=3.11 \ --build-arg CANN_VERSION=9.1.0 \ --build-arg ARCH=arm \ --build-arg PY_TAG=cp311 \ --build-arg TORCH_NPU_RELEASE_TAG=v26.1.1-pytorch2.12.0 \ --build-arg TORCH_NPU_PATCH_TAG=2.12.0.post2 \ -t image_name:tag \ -f Dockerfile .
Note: If your build environment requires a proxy, pass proxy variables via --build-arg, for example:
bashdocker build \ --build-arg HTTP_PROXY=http://proxy.example.com:8080 \ --build-arg HTTPS_PROXY=http://proxy.example.com:8080 \ --build-arg NO_PROXY=localhost,127.0.0.1 \ ... \ -f Dockerfile .
Replace the proxy address and port with your actual environment values.
bashdocker run \ --name pta_container \ --device /dev/davinci1 \ --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 \ -it ascend/pta:tag bash
bashdocker run \ --name pta_container \ --device /dev/davinci1 \ --device /dev/davinci_manager \ --device /dev/hisi_hdc \ --device /dev/ummu \ --device /dev/uburma \ -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 \ -it ascend/pta:tag bash
bash# Use TorchNPU image as base image and add user software FROM quay.io/ascend/torch-npu:2.12.0.post2-cann9.0.0-910b-ubuntu22.04-py3.12 RUN apt update -y && \ apt install gcc ... ...
See the license information for TorchNPU included in these images.
Like all container images, pre-installed software packages (Python, system libraries, etc.) may be subject to their own licenses.
The released Atlas software images are community versions; they are not intended for commercial use and serve solely as references for production practices.
Liability disclaimers are displayed in the image startup information and on the Atlas image platform.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务