intel/intel-extension-for-tensorflow

Verified Publisher

By Intel Corporation

Updated over 1 year ago
Archived

Image
Languages & frameworks
Machine learning & AI
Data science
4

50K+

intel/intel-extension-for-tensorflow repository overview

PROJECT NOT UNDER ACTIVE MANAGEMENT. This image repo will no longer be maintained by Intel.

Intel® Extension for TensorFlow*

Intel® Extension for TensorFlow* extends TensorFlow* with up-to-date feature optimizations for an extra performance boost on Intel hardware.

Intel® Extension for TensorFlow* is based on the TensorFlow PluggableDevice interface to bring Intel XPU(GPU, CPU, etc.) devices into TensorFlow* with flexibility for on-demand performance on the following Intel GPUs:

Note: There are two dockerhub repositories (intel/intel-extension-for-tensorflow and intel/intel-optimized-tensorflow) that are routinely updated with the latest images, however, some legacy images have not be published to both repositories.

XPU images

The images below include support for both CPU and GPU optimizations:

The following images include support for Intel® Deep Learning Essentials:

| Tag(s) | TensorFlow | ITEX | Driver | DL Essentials | Dockerfile | | ---------------------- | ----------- | -------------- | ------- | --------------- | | 2.15.0.3-xpu-pip-dl-essentials | v2.15.1 | v2.15.0.3 | 1099| 2025.0.2-6 | v0.4.0-Beta |

Run the XPU Container
docker run -it --rm \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-tensorflow:xpu

The images below additionally include Jupyter Notebook server:

Tag(s)TensorFlowIPEXDriverDockerfile
2.15.0.3-xpu-pip-jupyterv2.15.1v2.15.0.31077v0.4.0-Beta
2.15.0.2-xpu-pip-jupyterv2.15.1v2.15.0.21057v0.4.0-Beta
2.15.0.1-xpu-pip-jupyterv2.15.1v2.15.0.1803.63v0.4.0-Beta
xpu-jupyterv2.14.1v2.14.0.1736v0.3.4
Run the XPU Jupyter Container
docker run -it --rm \
    -p 8888:8888 \
    --net=host \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-tensorflow:2.15.0.3-xpu-pip-jupyter

After running the command above, copy the URL (something like http://127.0.0.1:$PORT/?token=***) into your browser to access the notebook server.


The images below are TensorFlow* Serving with GPU Optimizations:

Tag(s)TensorFlowIPEX
2.14.0.1-serving-gpu, serving-gpuv2.14.1v2.14.0.1
2.13.0.0-serving-gpu,v2.13.0v2.13.0.0
Run the Serving GPU Container
docker run -it --rm \
    -p 8500:8500 \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    -v $PWD/workspace:/workspace \
    -w /workspace \
    -e MODEL_NAME=<your-model-name> \
    -e MODEL_DIR=<your-model-dir> \
    intel/intel-extension-for-tensorflow:serving-gpu

For more details, follow the procedure in the Intel® Extension for TensorFlow* Serving instructions.

CPU only images

The images below are built only with CPU optimizations (GPU acceleration support was deliberately excluded):

Tag(s)TensorFlowITEXDockerfile
2.15.1-pip-base, latestv2.15.1v2.15.0.1v0.4.0-Beta
2.15.0-pip-basev2.15.0v2.15.0.0v0.4.0-Beta
2.14.0-pip-basev2.14.1v2.14.0.1v0.3.4
2.13-pip-basev2.13.0v2.13.0.0v0.2.3

The images below additionally include Jupyter Notebook server:

Tag(s)TensorFlowITEXDockerfile
2.15.1-pip-jupyterv2.15.1v2.15.0.1v0.4.0-Beta
2.15.0-pip-jupyterv2.15.0v2.15.0.0v0.4.0-Beta
2.14.0-pip-jupyterv2.14.1v2.14.0.1v0.3.4
2.13-pip-jupyterv2.13.0v2.13.0.0v0.2.3
Run the CPU Jupyter Container
docker run -it --rm \
    -p 8888:8888 \
    --net=host \
    -v $PWD/workspace:/workspace \
    -w /workspace \
    intel/intel-extension-for-tensorflow:2.15.1-pip-jupyter

After running the command above, copy the URL (something like http://127.0.0.1:$PORT/?token=***) into your browser to access the notebook server.


The images below additionally include Horovod:

Tag(s)TensorflowITEXHorovodDockerfile
2.15.1-pip-multinodev2.15.1v2.15.0.1v0.28.1v0.4.0-Beta
2.15.0-pip-multinodev2.15.0v2.15.0.0v0.28.1v0.4.0-Beta
2.14.0-pip-openmpi-multinodev2.14.1v2.14.0.1v0.28.1v0.3.4
2.13-pip-openmpi-mulitnodev2.13.0v2.13.0.0v0.28.0v0.2.3

Note

Passwordless SSH connection is also enabled in the image, but the container does not contain any SSH ID keys. The user needs to mount those keys at `/root/.ssh/id_rsa` and `/etc/ssh/authorized_keys`.

Tip

Before mounting any keys, modify the permissions of those files with `chmod 600 authorized_keys; chmod 600 id_rsa` to grant read access for the default user account.
Setup and Run ITEX Multi-Node Container

Important

Maintainence, Bug Fixes, and Releases of [Intel® Extension for TensorFlow*] Multi-Node Container for Xeon Processors have ceased development. The last supported version is `2.15.1`. For future releases, please use the [Intel® Extension for TensorFlow*] Multi-Node Container for XPU.

Some additional assembly is required to utilize this container with OpenSSH. To perform any kind of DDP (Distributed Data Parallel) execution, containers are assigned the roles of launcher and worker respectively:

SSH Server (Worker)

  1. Authorized Keys : /etc/ssh/authorized_keys

SSH Client (Launcher)

  1. Private User Key : /root/.ssh/id_rsa

To add these files correctly please follow the steps described below.

  1. Setup ID Keys

    You can use the commands provided below to generate the identity keys for OpenSSH.

    ssh-keygen -q -N "" -t rsa -b 4096 -f ./id_rsa
    touch authorized_keys
    cat id_rsa.pub >> authorized_keys
    
  2. Configure the permissions and ownership for all of the files you have created so far

    chmod 600 id_rsa config authorized_keys
    chown root:root id_rsa.pub id_rsa config authorized_keys
    
  3. Create a hostfile for horovod. (Optional)

    Host host1
        HostName <Hostname of host1>
        IdentitiesOnly yes
        IdentityFile ~/.root/id_rsa
        Port <SSH Port>
    Host host2
        HostName <Hostname of host2>
        IdentitiesOnly yes
        IdentityFile ~/.root/id_rsa
        Port <SSH Port>
    ...
    
  4. Configure Horovod in your python script

    import horovod.torch as hvd
    
    hvd.init()
    
  5. Now start the workers and execute DDP on the launcher

    1. Worker run command:

      docker run -it --rm \
          --net=host \
          -v $PWD/authorized_keys:/etc/ssh/authorized_keys \
          -v $PWD/tests:/workspace/tests \
          -w /workspace \
          intel/intel-optimized-tensorflow:2.15.1-pip-multinode \
          bash -c '/usr/sbin/sshd -D'
      
    2. Launcher run command:

      docker run -it --rm \
          --net=host \
          -v $PWD/id_rsa:/root/.ssh/id_rsa \
          -v $PWD/tests:/workspace/tests \
          -v $PWD/hostfile:/root/ssh/config \
          -w /workspace \
          intel/intel-optimized-tensorflow:2.15.1-pip-multinode \
          bash -c 'horovodrun --verbose -np 2 -H host1:1,host2:1 /workspace/tests/tf_base_test.py'
      

Note

[Intel® MPI] can be configured based on your machine settings. If the above commands do not work for you, see the documentation for how to configure based on your network.

The images below are TensorFlow* Serving with CPU Optimizations:

Tag(s)TensorFlowITEX
2.14.0.1-serving-cpu, serving-cpuv2.14.1v2.14.0.1
2.13.0.0-serving-cpuv2.13.0v2.13.0.0
Run the Serving CPU Container
docker run -it --rm \
    -p 8500:8500 \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    -v $PWD/workspace:/workspace \
    -w /workspace \
    -e MODEL_NAME=<your-model-name> \
    -e MODEL_DIR=<your-model-dir> \
    intel/intel-extension-for-tensorflow:serving-cpu

For more details, follow the procedure in the Intel® Extension for TensorFlow* Serving instructions.

CPU only images with Intel® Distribution for Python*

The images below are built only with CPU optimizations (GPU acceleration support was deliberately excluded) and include Intel® Distribution for Python*:

The images below additionally include Jupyter Notebook server:

Tag(s)TensorFlowITEXDockerfile
2.15.1-idp-jupyterv2.15.1v2.15.0.1v0.4.0-Beta
2.15.0-idp-jupyterv2.15.0v2.15.0.0v0.4.0-Beta
2.14.0-idp-jupyterv2.14.1v2.14.0.1v0.3.4
2.13-idp-jupyterv2.13.0v2.13.0.0v0.2.3

The images below additionally include Horovod:

Tag(s)TensorflowITEXHorovodDockerfile
2.15.1-idp-multinodev2.15.1v2.15.0.1v0.28.1v0.4.0-Beta
2.15.0-idp-multinodev2.15.0v2.15.0.0v0.28.1v0.4.0-Beta
2.14.0-idp-openmpi-multinodev2.14.1v2.14.0.1v0.28.1v0.3.4
2.13-idp-openmpi-mulitnodev2.13.0v2.13.0.0v0.28.0v0.2.3

XPU images with Intel® Distribution for Python*

The images below are built only with CPU and GPU optimizations and include Intel® Distribution for Python*:

Tag(s)PytorchITEXDriverDockerfile
2.15.0.3-xpu-idp-basev2.15.1v2.15.0.31077v0.4.0-Beta
2.15.0.2-xpu-idp-basev2.15.1v2.15.0.21057v0.4.0-Beta
2.15.0.1-xpu-idp-basev2.15.1v2.15.0.1803v0.4.0-Beta
2.15.0-xpu-idp-basev2.15.0v2.15.0.0803v0.4.0-Beta

The following images include support for Intel® Deep Learning Essentials:

| Tag(s) | TensorFlow | ITEX | Driver | DL Essentials | Dockerfile | | ---------------------- | ----------- | -------------- | ------- | --------------- | | 2.15.0.3-xpu-idp-dl-essentials | v2.15.1 | v2.15.0.3 | 1099| 2025.0.2-6 | v0.4.0-Beta |

The images below additionally include Jupyter Notebook server:

Tag(s)PytorchIPEXDriverJupyter PortDockerfile
2.15.0.3-xpu-idp-jupyterv2.15.1v2.15.0.310778888v0.4.0-Beta
2.15.0.2-xpu-idp-jupyterv2.15.1v2.15.0.210578888v0.4.0-Beta
2.15.0.1-xpu-idp-jupyterv2.15.1v2.15.0.18038888v0.4.0-Beta
2.15.0-xpu-idp-jupyter[v2.1.0]v2.15.0.08038888v0.4.0-Beta

Note

The support for CPU and XPU images containing Intel® Distribution for Python* are deprecated with no new releases. However, pip based images will be supported.

Build from Source

To build the images from source, clone the AI Containers repository, follow the main README.md file to setup your environment, and run the following command:

cd pytorch
docker compose build tf-base
docker compose run tf-base

You can find the list of services below for each container in the group:

Service NameDescription
tf-baseBase image with Intel® Extension for TensorFlow*
jupyterAdds Jupyter Notebook server
multinodeAdds Intel® MPI, Horovod and INC
xpuAdds Intel GPU Support
xpu-jupyterAdds Jupyter notebook server to GPU image

License

View the License for the Intel® Extension for TensorFlow*.

The images below also contain other software which may be under other licenses (such as TensorFlow*, Jupyter*, Bash, etc. from the base).

It is the image user's responsibility to ensure that any use of The images below comply with any relevant licenses for all software contained within.

* Other names and brands may be claimed as the property of others.

Tag summary

Content type

Image

Digest

sha256:29894ff23

Size

3.2 GB

Last updated

over 1 year ago

docker pull intel/intel-extension-for-tensorflow:2.15.0.3-xpu-idp-jupyter

This week's pulls

Pulls:

160

Last week