python

intel/python Docker 镜像

Intel® Distribution for Python* 是增强性能的Python发行版,集成Intel® Math Kernel Library等性能库,可提升程序速度10到100倍,支持Intel dGPU,包含最新驱动和OneAPI运行时库,加速数值计算与机器学习框架。

6 次收藏下载次数: 0状态:社区镜像维护者:intel仓库类型:镜像最近更新:
下载命令
点击查看

Intel® Distribution for Python*

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, latest2025.0.0
3.11-xpu-full2025.0.0
3.10-full2024.2.0
3.10-core2024.2.0

运行性能示例

要运行性能示例,请执行以下命令:

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

与标准Python对比结果

在上述命令中,您将在底部看到类似以下结果: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

使用XPU变体运行兼容性测试

使用以下命令检查系统上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仓库,按照主`README.md`文件设置环境,然后运行以下命令:

bash
cd python
docker compose build idp
docker compose run idp

要构建镜像的XPU变体,请运行以下命令:

bash
cd 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。

镜像用户有责任确保对以下镜像的任何使用均符合其中包含的所有软件的相关许可证要求。

* 其他名称和品牌可能是其各自所有者的财产。

镜像拉取方式

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

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

docker pull docker.xuanyuan.run/intel/python:<标签>

DockerHub 原生拉取命令

docker pull intel/python:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告