App Programming/Docker

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

goatlab 2023. 6. 15. 09:16
728x90
반응형
SMALL

 

nvidia-container-toolkit을 설치하여 오류를 해결한다.

 

$ 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

 

그리고 다음 명령어로 docker service를 재시작한다.

 

$ sudo systemctl restart docker

 

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html

 

Specialized Configurations with Docker — NVIDIA Container Toolkit

GPUs can be specified to the Docker CLI using either the --gpus option starting with Docker 19.03 or using the environment variable NVIDIA_VISIBLE_DEVICES. This variable controls which GPUs will be made accessible inside the container. Note When using the

docs.nvidia.com

 

728x90
반응형
LIST