创建带gpu容器报错
docker run -it --gpus='all' xxx(image)
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
查找解决方案,安装nvidia-docker
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
apt install nvidia-docker2
安装后依然报错,重启docker后解决
systemctl status docker