4

I recently updated from ubuntu 18.04 to ubuntu 20.04. I would like to develop on ubuntu 20.04 with nvidia-docker.

When I try to use the docker with the updated version, I get the following error.

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

Then I uninstalled the docker system according to this cite and reinstalled it according to this site.

How do I solve this problem?

musako
  • 201

2 Answers2

1

Follow this instructions for install docker-nvidia and docker-compose :

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt-get update
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce=18.03.1~ce~3-0~ubuntu
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
  sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo gpasswd -a $USER docker
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
  • Right now I've got nvidia-docker2 working without docker-ce - it actually works with docker.io >= 18.x. So if you have the off-the-shelf docker, you're fine. – Tomasz Gandor Jan 11 '21 at 22:55
  • I followed this instruction and every step worked. However, it changed nothing. I still get the same Error response from daemon: could not select device driver "" with capabilities: [[gpu]] – Ilya Chernov Apr 16 '23 at 17:55
0

unistall docker now in my pc(follow this cite).

And follow this cite.

musako
  • 201