轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥8起我的订单
文档
工具
提交工单页面收录
torch-npu

ascendai/torch-npu

ascendai

下载次数: 0状态:社区镜像维护者:ascendai仓库类型:镜像最近更新:7 小时前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,让镜像更快,让人生更轻。
点击查看

TorchNPU

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.

Quick Reference

  • TorchNPU is maintained by the https://www.hiascend.com/developer/software/ai-frameworks/pytorch

  • Where to get help

    • https://www.hiascend.com/developer/ascendhub
    • https://www.hiascend.com/document/detail/zh/Pytorch/730/index/index.html
    • https://www.hiascend.com/developer
    • Issue Feedback

Supported Tags and Dockerfile Usage

Tag Specification

Tags follow the format:

text
<TorchNPU_version>-<CANN_version>-<chip>-<os>-<python_version>
FieldvalueDescription
TorchNPU Version2.12.0For details, see the version notes in the readme.
CANN_version9.1.0For details, see the version notes in the readme.
ChipSpecific example values can be found in the CANN mirrorchip model identifier
OSubuntu22.04 / openeuler24.03OS distribution used for the base image
Python Versionpy3.12Major Python version pre-installed in the image

TorchNPU timely adaptation version (pt2.13)

  • 2.13.0rc1-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.13.0rc1-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.13.0rc1-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.13.0rc1-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.13.0rc1-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.13.0rc1-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.13.0rc1-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.13.0rc1-cann9.1.0-950-openeuler24.03-py3.12

Tag list for version 26.1.1

As 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.12
  • 2.12.0.post2-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.12.0.post2-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.12.0.post2-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.12.0.post2-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.12.0.post2-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.12.0.post2-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.12.0.post2-cann9.1.0-950-openeuler24.03-py3.12
  • 2.11.0.post2-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.11.0.post2-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.11.0.post2-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.11.0.post2-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.11.0.post2-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.11.0.post2-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.11.0.post2-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.11.0.post2-cann9.1.0-950-openeuler24.03-py3.12
  • 2.10.0.post6-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.10.0.post6-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.10.0.post6-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.10.0.post6-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.10.0.post6-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.10.0.post6-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.10.0.post6-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.10.0.post6-cann9.1.0-950-openeuler24.03-py3.12
  • 2.9.0.post8-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.9.0.post8-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.9.0.post8-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.9.0.post8-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.9.0.post8-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.9.0.post8-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.9.0.post8-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.9.0.post8-cann9.1.0-950-openeuler24.03-py3.12
  • 2.7.1.post10-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.7.1.post10-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.7.1.post10-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.7.1.post10-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.7.1.post10-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.7.1.post10-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.7.1.post10-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.7.1.post10-cann9.1.0-950-openeuler24.03-py3.12

Dockerfile build parameters

See dockerfile:dockerfile

parametersDescriptionRequiredReference SourceValue
TORCH_VERSIONFull TorchNPU version numberYesTorchNPU repo releases2.12.0.post2
CHIP_ARCHchip architecture identifierYesCANN image tag rulesSpecific example values can be found in the CANN mirror
OSBase image operating systemYesCANN image tag rulesubuntu / openeuler
OS_VERSIONOperating system versionYesCANN image tag rules22.04 / 24.03
PY_VERSIONPython version pre-installed in base imageYesCANN image tag rules3.11
CANN_VERSIONCANN toolkit versionYesCANN base image repo9.1.0
ARCHHost hardware architectureYesEnvironment hardwarearm / x86
PY_TAGPython package ABI tag (cp + version number)YesStrictly match PY_VERSIONcp311
TORCH_NPU_RELEASE_VERSIONOfficial TorchNPU release tag (including PyTorch version)YesTorchNPU repo releasesv26.1.1-pytorch2.12.0.post2
TORCH_NPU_PATCH_TAGTorchNPU version number in the release package nameYesTorchNPU repo releases2.12.0.post2
MANYLINUX_VERPyPI package compatible system versionNotorch official wheel specmanylinux_2_28
PIP_MIRROR_URLpip installation source URL (Tsinghua mirror by default)NoPyPI mirror sourceshttps://pypi.tuna.tsinghua.edu.cn/simple

Parameter Sources

  1. Image tags, operating systems, and version information:https://quay.io/repository/ascend/cann?tab=tags tag

  2. TORCH_NPU_RELEASE_VERSION and TORCH_NPU_PATCH_TAG parameter values are from TorchNPU Official Release Versions. Example with a wheel download URL:

[***]

  • TORCH_NPU_RELEASE_VERSION is the part between download/ and /torch_npu-, e.g. v26.1.1-pytorch2.12.0.
  • TORCH_NPU_PATCH_TAG is the part between torch_npu- and -cp310, e.g. 2.12.0.post2.

Quick Start

Build TorchNPU Image

Taking the construction of the 2.12.0.post2-a3-ubuntu22.04-py3.12 image as an example:

bash
docker 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:

bash
docker 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.

Run TorchNPU Container

bash
docker 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

Running CANN containers on 950 series aarch64 architecture products

bash
docker 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

Secondary Development

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 ...

...

License/Disclaimer

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.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 torch-npu 镜像标签

docker pull docker.xuanyuan.run/ascendai/torch-npu:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull ascendai/torch-npu:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

专属域名用法

专属域名 · 开启停用 · 多仓库

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

docker.sock / daemon

账号

失败是否计费

manifest · blob · 计费

申请开票(企业 / 个人)

开票 · 发票 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
ascendai/torch-npu
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥8/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 torch-npu 镜像推荐

rocm/pytorch logo

rocm/pytorch

rocm
基于ROCm的PyTorch Docker镜像为开发者提供了预配置的深度学习环境,集成了PyTorch框架与AMD ROCm开源计算平台,支持AMD GPU硬件加速,无需手动配置驱动及库依赖,可直接用于深度学习模型的开发、训练与部署,有效简化环境搭建流程,确保跨平台一致性,适用于科研机构、工业界等多种场景,助力高效利用AMD硬件资源开展AI相关任务。
124 次收藏100万+ 次下载
20 天前更新
bitnamicharts/pytorch logo

bitnamicharts/pytorch

bitnamicharts
Bitnami提供的PyTorch Helm chart,用于在Kubernetes环境中简化PyTorch的部署与管理。
50万+ 次下载
11 小时前更新
semitechnologies/img2vec-pytorch logo

semitechnologies/img2vec-pytorch

semitechnologies
暂无描述
10万+ 次下载
3 年前更新
rocm/pytorch-nightly logo

rocm/pytorch-nightly

rocm
该Docker仓库用于托管PyTorch每日构建版Docker镜像。
7 次收藏5万+ 次下载
4 天前更新
intel/pytorch logo

intel/pytorch

intel
这是Intel官方优化的PyTorch镜像,基于Ubuntu 24.04系统,支持Intel CPU(AMX/AVX-512等指令集)和Arc系列GPU,用于深度学习模型的开发与高效运行。
1 次收藏1万+ 次下载
13 天前更新
rocm/pytorch-xdit logo

rocm/pytorch-xdit

rocm
基于ROCm的xDiT镜像,用于运行并行扩散推理
8.7千+ 次下载
20 天前更新

查看更多 torch-npu 相关镜像