
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m 可增强性能,将程序速度提升10到100倍。它是一个Python发行版,包含https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html (oneMKL) 和其他Intel性能库,通过加速核心数值计算和机器学习包实现近原生性能。
Intel® Distribution for Python* 还支持Intel® dGPU,包含最新的[Intel® dGPU驱动]和Intel® OneAPI运行时库(如https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html、https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html和https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneccl.html),使机器学习框架能够利用XPU设备插件。
以下镜像包含https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m安装中的核心包或所有包的不同变体。
| 标签(s) | IDP版本 |
|---|---|
3.11-full, latest | 2025.0.0 |
3.11-xpu-full | 2025.0.0 |
3.10-full | 2024.2.0 |
3.10-core | 2024.2.0 |
要运行性能示例,请执行以下命令:
bashgit clone https://github.com/intel/ai-containers cd ai-containers/python docker run --rm -it \ -v $PWD/tests:/tests \ docker.xuanyuan.run/intel/python:latest \ python /tests/perf_sample.py
在上述命令中,您将在底部看到类似以下结果:Time Consuming: 0.03897857666015625。可与python:3.11-slim-bullseye对比:
bash# 使用上述命令的工作目录 docker run --rm -it \ -v $PWD/tests:/tests \ docker.xuanyuan.run/python:3.10-slim-bullseye \ bash pip install numpy python /tests/perf_sample.py
使用以下命令检查系统上Intel dGPU设备的可用性以及Intel® OneAPI运行时库的存在:
bash# 使用第一个命令的工作目录 docker run --rm -it \ -v $PWD/tests:/tests \ --device /dev/dri \ docker.xuanyuan.run/intel/python:3.11-xpu-full \ bash /tests/xpu_base_layers_test.sh
要从源码构建镜像,请克隆https://github.com/intel/ai-containers%E4%BB%93%E5%BA%93%EF%BC%8C%E6%8C%89%E7%85%A7%E4%B8%BB%60README.md%60%E6%96%87%E4%BB%B6%E8%AE%BE%E7%BD%AE%E7%8E%AF%E5%A2%83%EF%BC%8C%E7%84%B6%E5%90%8E%E8%BF%90%E8%A1%8C%E4%BB%A5%E4%B8%8B%E5%91%BD%E4%BB%A4%EF%BC%9A
bashcd python docker compose build idp docker compose run idp
要构建镜像的XPU变体,请运行以下命令:
bashcd python docker compose build xpu docker compose run xpu
以下是组中每个容器的服务列表:
| 服务名称 | 描述 |
|---|---|
idp | 包含https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m的基础镜像 |
pip | 不含https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m的等效Python镜像 |
xpu | 带Intel XPU插件的基础镜像,包含https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m |
查看[Intel® Distribution for Python]的https://github.com/intel/ai-containers/blob/main/LICENSE%E3%80%82
镜像用户有责任确保对以下镜像的任何使用均符合其中包含的所有软件的相关许可证要求。
* 其他名称和品牌可能是其各自所有者的财产。
以下是 intel/python 相关的常用 Docker 镜像,适用于 Web 开发、数据科学、机器学习 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务