nvidia-docker Images

DGX-1 and NGC containers are hosted in an nvidia-docker repository called nvcr.io. As you read in the previous section, these containers can be “pulled” from the repository and used for GPU accelerated applications such as scientific workloads, visualization, and deep learning.

A Docker image is simply a file-system that a developer builds. An nvidia-docker image serves as the template for the container, and is a software stack that consists of several layers. Each layer depends on the layer below it in the stack.

From a Docker image, a container is formed. When creating a container, you add a writable layer on top of the stack. A Docker image with a writable container layer added to it is a container. A container is simply a running instance of that image. All changes and modifications made to the container are made to the writable layer. You can delete the container; however, the Docker image remains untouched.

Figure 1 depicts the nvidia-docker stack for the DGX-1. Notice that the nvidia-docker tools sit above the host OS and the NVIDIA Drivers. The tools are used to create and use NVIDIA containers - these are the layers above the nvidia-docker layer. These containers have applications, deep learning SDK’s, and the CUDA® Toolkit™ . The nvidia-docker tools take care of mounting the appropriate NVIDIA Drivers.
Figure 1. nvidia-docker mounts the user mode components of the NVIDIA driver and the GPUs into the Docker container at launch. nvidia-docker mounts the user mode components of the NVIDIA driver and the GPUs into the Docker container at launch.

nvidia-docker Images Versions

Each release of an nvidia-docker image is identified by a version “tag”. For simpler images this version tag usually contains the version of the major software package in the image. More complex images which contain multiple software packages or versions may use a separate version solely representing the containerized software configuration. One common scheme is versioning by the year and month of the image release. For example, the 17.01 release of an image was released in January, 2017.

An image name consists of two parts separated by a colon. The first part is the name of the container in the repository and the second part is the “tag” associated with the container. These two pieces of information are shown in Figure 2, which is the output from issuing the docker images command.

Figure 2. Output from docker images command Output from docker images command
Figure 2 shows simple examples of image names, such as:
  • nvidia-cuda:8.0-devel
  • ubuntu:latest
  • nvcr.io/nvidia/tensorflow:17.01
If you choose not to add a tag to an image, by default the word “latest ” is added as the tag, however all NGC containers have an explicit version tag.

In the next sections, you will use these image names for running containers. Later in the document, there is also a section on creating your own containers or customizing and extending existing containers.

CUDA Toolkit Container

The CUDA Toolkit provides a development environment for creating high performance GPU-accelerated applications. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library to deploy your application.

All NGC Container images are based on the CUDA platform layer (nvcr.io/nvidia/cuda). This image provides a containerized version of the software development stack underpinning all other NGC containers, and is available for users who need more flexibility to build containers with custom CUDA applications.

OS Layer

Within the software stack, the lowest layer (or base layer) is the user space of the OS. The software in this layer includes all of the security patches that are available within the month of the release.

CUDA Layer

Compute Unified Device Architecture® (CUDA) is a parallel computing platform and programming model created by NVIDIA to give application developers access to the massive parallel processing capability of GPUs. CUDA is the foundation for GPU acceleration of deep learning as well as a wide range of other computation and memory-intensive applications ranging from astronomy, to molecular dynamics simulation, to computational finance.

CUDA Runtime

The CUDA runtime layer provides the components needed to execute CUDA applications in the deployment environment. The CUDA runtime is packaged with the CUDA Toolkit and includes all of the shared libraries, but none of the CUDA compiler components.

CUDA Toolkit

The CUDA Toolkit provides a development environment for developing optimized GPU-accelerated applications. It includes GPU-accelerated CUDA libraries which enable drop-in acceleration across multiple domains such as linear algebra, image and video processing, deep learning and graph analytics. For developing custom algorithms, you can use available integrations with commonly used languages and numerical packages as well as well-published development APIs.