4.2 Enroot - Images from Nvidia NGC

The Enroot container framework can import images from a variety of registries (for example, Docker Hub) and spin up containers from them.
However, for LRZ AI Systems we strongly recommend using NVIDIA’s container images from the NVIDIA NGC catalog.
These images are guaranteed to be fully optimized for NVIDIA GPUs and receive regular maintenance and updates directly from NVIDIA.

The NVIDIA NGC Cloud

Usage of NGC catalog requires online registration and API key authentication from the machine downloading the container.

Register

Register by creating an NVIDIA profile here: https://ngc.nvidia.com/signin.

Once logged in, you can already search for container images by keyword.
Go to the “Containers” tab, enter a keyword (e.g., Pytorch) in the search box, and press Enter.
The image below shows an example search result.

Clicking on a container shows details such as the image name and tag.
While the format on NGC follows Docker conventions,
the key information is the image name, which you’ll need for importing with Enroot.

Authenticate

Authenticate yourself from the machine to download images to the AI-Systems.
The following is a step-by-step guide to generating an NVIDIA NGC API key and configuring it for use with Enroot:

  • Sign in to the NVIDIA NGC website: https://ngc.nvidia.com/catalog
  • Click your user icon (top right) and select Setup
  • Click Get API Key, then Generate API Key
  • Copy the generated key and save it securely
  • On your system, create the directory ~/enroot if it doesn’t exist
  • In ~/enroot, create a file named .credentials and add the following content:
machine nvcr.io login $oauthtoken password <KEY>
machine authn.nvidia.com login $oauthtoken password <KEY>

Be sure that that you include a new line at the end.  

After doing this, you are ready to start using the NVIDIA NGC containers with the Enroot container framework. 

Image Import

For example, in the case of the PyTorch container, you would use the following enroot command to import the image:

enroot import docker://nvcr.io/nvidia/pytorch:23.11-py3

Make sure to select the correct container version and verify that the preinstalled packages meet your needs. Ensure compatibility between the container and the system setup—for example, by checking the installed NVIDIA driver version using nvidia-smi on the compute node. It’s also important to confirm the CUDA version and other dependencies align with what’s expected by the container.