The NGC catalog hosts containers for the top AI and data science software for HPC applications and data analytics. NGC catalog containers provide powerful and easy-to-deploy software proven to deliver the fastest results, allowing users to build solutions from a tested framework, with complete control.

The goal of this page is to show how to build and run an Nvidia GPU cloud (NGC) containers on Discovery.

Building NGC Container

To build NGC container, simply follow these steps:

  1. Create an account at Nvidia NGC - SignUp page.

  2. Generate NGC API key at Nvidia NGC - Setup page.

  3. Configure your working environment at Discovery so that Apptainer can find your NGC container registry authentication credential (The user name and the API key generated from Step 2). For that, execute the export commands below in your terminal.

export APPTAINER_DOCKER_USERNAME='$oauthtoken'
  1. Pull an image container from Nvidia NGC. For that, go to the section Container at Nvidia NGC - Containers. Then, navigate the list of containers displayed to find your desired image container. Once it’s found, click on it, and at the top right of your screen click the button Pull tag to copy the pull command to the clipboard. For this tutorial, Nvidia CUDA image container has been selected.

  2. Finally, execute the command below in your terminal so that Apptainer retrieves the docker image from NGC and converts it into SIF image.

For example, to pull and build PyTorch NGC Container, you run:

apptainer build pytorch.sif docker://nvcr.io/nvidia/pytorch:21.09-py3

For more information, see also NGC Private Registry User Guide.

Running NGC Containers

To integrate NGC containers into a Slurm job and run them on Discovery, refer to Using Containers.