작심삼일

[Docker 에러] Error response from daemon: could not select device driver "" with capabilities: [[gpu]] 본문

정리/잡 에러들

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

yun_s 2024. 9. 10. 21:14
728x90
반응형

에러

docker run으로 도커를 띄울 때 이 에러가 뜨면서 도커에서 gpu를 잡지 못했다.

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

 

해결 방법

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
$ sudo systemctl restart docker
728x90
반응형
Comments