Installation

Prerequisites

  1. Linux x64.

  2. NVIDIA Driver supporting CUDA 11.0 or later (i.e. 450.80.02 or later driver releases).

  3. CUDA Toolkit - for DALI based on CUDA 12, the toolkit is linked dynamically and it is required to be installed. For CUDA 11 builds it is optional.

  4. [Optional] One or more of the following deep learning frameworks:

DALI in NGC Containers

DALI is preinstalled in the TensorFlow, PyTorch, NVIDIA Optimized Deep Learning Framework, powered by Apache MXNet, and PaddlePaddle containers on NVIDIA GPU Cloud.


pip - Official Releases

nvidia-dali

Execute the following command to install the latest DALI for specified CUDA version (please check support matrix to see if your platform is supported):

  • for CUDA 11.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda110
  • for CUDA 12.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda120

Note

CUDA 11.0 and CUDA 12.0 build uses CUDA toolkit enhanced compatibility. It is built with the latest CUDA 11.x/12.x respectively toolkit while it can run on the latest, stable CUDA 11.0 and CUDA 12.0 capable drivers (450.80 or later and 525.60 or later respectively). Using the latest driver may enable additional functionality. More details can be found in enhanced CUDA compatibility guide.

Note

Please always use the latest version of pip available (at least >= 19.3) and update when possible by issuing pip install –upgrade pip

nvidia-dali-tf-plugin

DALI doesn’t contain prebuilt versions of the DALI TensorFlow plugin. It needs to be installed as a separate package which will be built against the currently installed version of TensorFlow:

  • for CUDA 11.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-tf-plugin-cuda110
  • for CUDA 12.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-tf-plugin-cuda120

Installing this package will install nvidia-dali-cudaXXX and its dependencies, if they are not already installed. The package tensorflow-gpu must be installed before attempting to install nvidia-dali-tf-plugin-cudaXXX.

Note

The packages nvidia-dali-tf-plugin-cudaXXX and nvidia-dali-cudaXXX should be in exactly the same version. Therefore, installing the latest nvidia-dali-tf-plugin-cudaXXX, will replace any older nvidia-dali-cudaXXX version already installed. To work with older versions of DALI, provide the version explicitly to the pip install command.

pip - Nightly and Weekly Releases

Note

While binaries available to download from nightly and weekly builds include most recent changes available in the GitHub some functionalities may not work or provide inferior performance comparing to the official releases. Those builds are meant for the early adopters seeking for the most recent version available and being ready to boldly go where no man has gone before.

Note

It is recommended to uninstall regular DALI and TensorFlow plugin before installing nightly or weekly builds as they are installed in the same path

Nightly Builds

To access most recent nightly builds please use flowing release channel:

  • for CUDA 11.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/nightly --upgrade nvidia-dali-nightly-cuda110
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/nightly --upgrade nvidia-dali-tf-plugin-nightly-cuda110
  • for CUDA 12.0:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/nightly --upgrade nvidia-dali-nightly-cuda120
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/nightly --upgrade nvidia-dali-tf-plugin-nightly-cuda120

Weekly Builds

Also, there is a weekly release channel with more thorough testing. To access most recent weekly builds please use the following release channel (available only for CUDA 12):

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/weekly --upgrade nvidia-dali-weekly-cuda120
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/weekly --upgrade nvidia-dali-tf-plugin-weekly-cuda120

pip - Legacy Releases

For older versions of DALI (0.22 and lower), use the package nvidia-dali. The CUDA version can be selected by changing the pip index:

pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/9.0 --upgrade nvidia-dali
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/9.0 --upgrade nvidia-dali-tf-plugin
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/10.0 --upgrade nvidia-dali
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/10.0 --upgrade nvidia-dali-tf-plugin
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda102
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-tf-plugin-cuda102
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/11.0 --upgrade nvidia-dali
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/11.0 --upgrade nvidia-dali-tf-plugin

CUDA 11 build is provided starting from DALI 0.22.0.

CUDA 10.2 build is provided starting from DALI 1.4.0 up to DALI 1.20.

CUDA 10 build is provided up to DALI 1.3.0.

CUDA 9 build is provided up to DALI 0.22.0.

Open Cognitive Environment (Open-CE)

DALI is also available as a part of the Open Cognitive Environment - a project that contains everything that is needed to build conda packages for a collection of machine learning and deep learning frameworks.

This effort is community-driven and the DALI version available there may not be up to date.

Prebuild packages (including DALI) are hosted by external organizations.