Install nvidia-docker on Ubuntu 20.04
First install docker according to the official website
Refer to the official website installation, there are three different installation methods
After installing nvidia-docker
Refer to the official website for installation
Possible problems with installing nvidia-docker: gpg: No valid OpenPGP data found
Solution:
sudo gedit /etc/hosts
Add the following at the end
185.199.108.153 nvidia.github.io
185.199.109.153 nvidia.github.io
185.199.110.153 nvidia.github.io
185.199.111.153 nvidia.github.io
pycharm link docker
1. Configure docker remote login
sudo gedit /lib/systemd/system/docker.service
Modify ExecStart
# ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
2. Restart the docker service
systemctl daemon-reload
systemctl restart docker.service
3. Configure pycharm, open setting
for reference