Preparing for Using Docker Containers
www.nvidia.com
NVIDIA DGX-1
DU-08033-001 _v13.1 | 21
Ensure your environment meets the prerequisites before installing Docker. For more
information, see
Getting Started with Docker
.
1.
Install
Docker
.
$
sudo apt-key adv --keyserver
hkp://p80.pool.sks-keyservers.net:80 --recv-keys
58118E89F3A912897C070ADBF76221572C52609D
$
echo deb https://apt.dockerproject.org/repo ubuntu-trusty main
| sudo tee /etc/apt/sources.list.d/docker.list
$
sudo apt-get update
$
sudo apt-get -y install docker-engine=1.12.6-0~ubuntu-trusty
2.
Edit the
/etc/default/docker
file to use the Overlay2 storage driver.
a) Open the
/etc/default/docker
file for editing.
$
sudo vi /etc/default/docker
b) Add the following line:
DOCKER_OPTS="--storage-driver=overlay2"
If there is already a
DOCKER_OPTS
line, then add the parameters (text between
the quote marks) to the
DOCKER_OPTS
environment variable.
c) Save and close the
/etc/default/docker
file when done.
d) Restart Docker with the new configuration.
$
sudo service docker restart
3.
Install
NVIDIA Docker
.
The following example installs both nvidia-docker and the nvidia-docker-plugin.
$
wget -P /tmp
https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-
docker_1.0.1-1_amd64.deb
$
sudo dpkg -i /tmp/nvidia-docker*.deb && rm
/tmp/nvidia-docker*.deb
3.2. Configuring Docker IP Addresses
To ensure that the DGX-1 can access the network interfaces for nvidia-docker containers,
the nvidia-docker containers should be configured to use a subnet distinct from other
network resources used by the DGX-1.
By default, Docker uses the
172.17.0.0/16
subnet. Consult your network
administrator to find out which IP addresses are used by your network.
If your network
does not conflict with the default Docker IP address range, then no changes are needed
and you can skip this section.
However, ff your network uses the addresses within this range for the DGX-1,
you should change the default nvidia-docker network addresses. The method for
accomplishing this depends on the Base OS software version installed on the DGX-1.