使用docker19.03运行gpu程序时,会报错
docker: 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/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
yum install -y nvidia-container-toolkit
重启docker服务,问题解决。
网友评论