5. Using NVIDIA NGC Containers on the LRZ AI Systems

The Enroot container framework allows importing container images and creating containers out of them from different repositories (e.g., from the Docker Hub). Nonetheless, the recommendation for the LRZ AI Systems is to use the container images provided by NVIDIA via the so-called NVIDIA NGC Cloud https://ngc.NVIDIA.com/catalog as they are optimised for NVIDIA GPUs and updated by NVIDIA on a regular basis.  

The NVIDIA NGC Cloud

The NVIDIA NGC cloud can be accessed at https://ngc.NVIDIA.com/catalog and requires user registration. See the image below:

Once registered and logged into, the system allows you searching containers images based on keywords. For this, click on the container tab, type your keyword on the search box, and search (type intro). The following picture shows the results when searching with the keyword 'Tensorflow'. 

If you click on one of these containers options, you can see information such as the container image name (and tag). The following picture shows that information for the Tensorflow container. Despite the showed information is relative to docker, the important thing is to get the container image name as it can be later imported using the Enroot container framework. 

Using NVIDIA NGC Cloud Containers with Enroot and srun

As indicated before, using the NVIDIA NGC Cloud requires registration. In addition, it requires authentication from the machine where you want to download any container image. This authentication is done with an API key. To generate this API key, proceed as follows. 


  • Click on the 'Get API Key' button (see image):

  • Click on the 'Generate API Key' button  (see image): 

  • Copy the key that is shown to you (see image):

Now, in your home directory use a text editor to create the file enroot/.credentials (create the "enroot" directory first, if needed) with the following content

machine nvcr.io login $oauthtoken password <KEY>
machine authn.nvidia.com login $oauthtoken password <KEY>

where <KEY> is the API key generated and copied in the previous step. Be sure that that you include a new line at the end.  

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