Docker Tutorial
Contents
Docker Installation
Install docker engine
and Nvidia-docker
on related platforms.
Problem of seeing CUDA11 on docker while the host CUDA version in 11.
One of the primary functions of
nvidia-docker
is to inject the all of NVIDIA driver libs from the host into the container so that the container will run properly with GPUs. One of these libraries islibcuda.so
. This is one of the reasons you are seeingnvidia-smi
report the driver version from your host.
Different between nvidia docker image: base/runtime/devel
Example Template Format of Dockerfile
|
|
Build your customized image through Dockerfile
|
|
|
|
Docker run contains docker create and run two commands, it first creates a container based on one image, then it runs /bin/bash on the container. One can use exit
to stop the container or can push Ctrl + P + Q
to detach container’s terminal and keep the container running.
|
|
Checking the running container, option -a
can be used to check the exited containers.
|
|
|
|
Through docker ps
, we could use the ID number of the container to restart it and attach to it based on the specified commends.
Saving and loading the Docker image
Some of the servers or clusters are offline, so we may package the image we want and upload it to the remote server.
|
|
|
|
|
|
Source
Author Zitao
LastMod 2021-12-26