If you just want to use docker and do not need to use the old nvidia-docker2, You can follow the tutorial on:
sudo apt-get install -y docker.io nvidia-container-toolkit
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:21.06-py3 nvidia-smi
I will see if I can get nvidia-docker2 working, I was able to get it to install and have the file /usr/bin/nvidia-container-runtime at the same time as having docker (like the tutorial) function at the same time. However, I just did that tonight and I have to test the ‘nvidia-docker2’ being functional.
Mark