
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The official CANN docker image.
Maintained by: https://gitee.com/openeuler/cloudnative.
Where to get help: https://gitee.com/openeuler/cloudnative, https://gitee.com/openeuler/community.
Current CANN docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
AI-oriented heterogeneous compute architecture provides hierarchical APIs to help you quickly build AI applications and services based on the Ascend platform.
Learn more about on CANN Document.
The tag of each cann docker image is consist of the complete software stack version. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/7.0.RC1.alpha002/22.03-lts-sp2/Dockerfile | CANN 7.0.RC1.alpha002 on openEuler 22.03-LTS-SP2 | arm64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/8.0.RC1/22.03-lts-sp4/Dockerfile | CANN 8.0.RC1 with Python 3.8 on openEuler 22.03-LTS-SP4 | arm64,amd64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/8.1.RC1-python3.11/22.03-lts/Dockerfile | CANN 8.1.RC1 with Python 3.11 on openEuler 22.03-LTS | arm64,amd64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/8.1.RC1-python3.11/24.03-lts/Dockerfile | CANN 8.1.RC1 with Python 3.11 on openEuler 24.03-LTS | arm64,amd64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/8.2.RC1.alpha001-python3.10/22.03-lts/Dockerfile | CANN 8.2.RC1.alpha001 with Python 3.10 on openEuler 22.03-LTS | arm64,amd64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/cann/8.2.RC1.alpha002-python3.10/22.03-lts/Dockerfile | CANN 8.2.RC1.alpha002 with Python 3.10 on openEuler 22.03-LTS | arm64,amd64 |
In this usage, users can select the corresponding {Tag} and container startup options based on their requirements.
Pull the openeuler/cann image from docker
bashdocker pull openeuler/cann:{Tag}
Start a cann instance
bashdocker run \ --name my-cann \ --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 openeuler/cann:{Tag} bash
Container startup options
| Option | Description |
|---|---|
--name my-cann | Names the container my-cann. |
--device /dev/davinciX | NPU device, where X is the physical ID number of the chip, e.g., davinci1. |
--device /dev/davinci_manager | Davinci-related management device. |
--device /dev/devmm_svm | Memory management-related device. |
--device /dev/hisi_hdc | HDC-related management device. |
-v /usr/local/dcmi:/usr/local/dcmi | Mounts the host's DCMI .so and interface file directory /usr/local/dcmi to the container. Please modify according to actual situation. |
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi | Mount the host npu-smi tool "/usr/local/bin/npu-smi" into the container. Please modify it according to the actual situation. |
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ | Mounts the host directory /usr/local/Ascend/driver/lib64/driver to the container. Please modify according to the path where the driver's .so files are located. |
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info | Mounts the host's version information file /usr/local/Ascend/driver/version.info to the container. Please modify according to actual situation. |
-v /etc/ascend_install.info:/etc/ascend_install.info | Mounts the host's installation information file /etc/ascend_install.info to the container. |
-it | Starts the container in interactive mode with a terminal (bash). |
openeuler/cann:{Tag} | Specifies the Docker image to run, replace {Tag} with the specific version or tag of the openeuler/cann image you want to use. |
View container running logs
bashdocker logs -f my-cann
To get an interactive shell
bashdocker exec -it my-cann /bin/bash
If you have any questions or want to use some special features, please submit an issue or a pull request on https://gitee.com/openeuler/openeuler-docker-images.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务