nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
This error suggests that you're trying to start a Docker container that requires GPU support, but the Docker GPU drivers are not properly configured. Here are a few steps to resolve this: 1. Ensure NVIDIA Container Toolkit is installed:
1 2 3 4 5 6 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 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 sudo apt-get update sudo apt-get install -y nvidia-container-toolkit |
1 | sudo systemctl restart docker |
1 | docker run --gpus all nvidia/cuda:11.0-base nvidia-smi |
1 | sudo docker start myproject --gpus all |
Testing if the previous output contains the string nvidia-docker2
: False
Testing if the previous output contains the string nvidia-container-toolkit
: True
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
This error suggests there might be an issue with GPU support when starting your Docker container. Here are some steps to troubleshoot: 1. Ensure NVIDIA Docker is installed:
1 2 | sudo apt-get update sudo apt-get install -y nvidia-container-toolkit |
1 | sudo systemctl restart docker |
1 | nvidia-smi |
1 2 3 | sudo docker start myproject --gpus all # or sudo docker run --gpus all myproject |
1 | sudo docker run --gpus all nvidia/cuda:11.0-base nvidia-smi |
Testing if the previous output contains the string nvidia-docker2
: False
Testing if the previous output contains the string nvidia-container-toolkit
: True
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
This error typically occurs when you're trying to start a Docker container that requires GPU support, but Docker is not properly configured to use GPU resources. Here are some steps to resolve this: 1. Ensure you have NVIDIA Container Toolkit installed:
1 2 3 4 5 6 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 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 sudo apt-get update sudo apt-get install -y nvidia-container-toolkit |
1 | sudo systemctl restart docker |
1 | docker info | grep Runtime |
1 | sudo docker start myproject --runtime=nvidia |
1 | sudo docker run --gpus all ... |
Testing if the previous output contains the string nvidia-docker2
: False
Testing if the previous output contains the string nvidia-container-toolkit
: True
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
This error suggests that there's an issue with GPU support when trying to start your Docker container. Here are some potential solutions: 1. Install NVIDIA Container Toolkit:
1 2 3 4 5 6 7 8 9 | # Add NVIDIA repository distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 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 # Install NVIDIA Container Toolkit sudo apt-get update sudo apt-get install -y nvidia-container-toolkit sudo systemctl restart docker |
1 2 3 4 5 | # Check NVIDIA drivers nvidia-smi # Check Docker GPU support docker run --gpus all nvidia/cuda:11.0-base nvidia-smi |
1 2 3 | sudo docker start myproject --gpus all # Or docker run --gpus all myproject |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Ensure GPU runtime is configured sudo nano /etc/docker/daemon.json # Add or modify: { "default-runtime": "nvidia", "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } } } # Restart Docker sudo systemctl restart docker |
Testing if the previous output contains the string nvidia-docker2
: False
Testing if the previous output contains the string nvidia-container-toolkit
: True
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
nicholas@server:~/project$ sudo docker start myproject [sudo] password for nicholas: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] Error: failed to start containers: myproject
This error typically occurs when you're trying to start a Docker container that requires GPU support, but the GPU drivers or Docker GPU runtime are not properly configured. Here are some steps to resolve this: 1. Ensure NVIDIA GPU drivers are installed:
1 | nvidia-smi |
1 2 3 4 5 6 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 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 sudo apt-get update sudo apt-get install -y nvidia-container-toolkit |
1 | sudo systemctl restart docker |
1 | sudo docker start myproject --gpus all |
Testing if the previous output contains the string nvidia-docker2
: False
Testing if the previous output contains the string nvidia-container-toolkit
: True