Nvidia Docker for Ubuntu 21.04?
It is not official, but you can change the distribution
variable on the instruction page into ubuntu20.04
, like this:
distribution='ubuntu20.04' \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
The rest is the same:
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker
Then, you can check your installation:
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
Should return something like this:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.06 Driver Version: 450.51.06 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla T4 On | 00000000:00:1E.0 Off | 0 |
| N/A 34C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
N.B.
I just need to use nvidia-docker
to do some deep learning with tensorflow, and the solution I gave above has no problem for training and inferencing.