首页 > 其他分享 >docker: Error response from daemon: could not select device driver "" with capabilities: [

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

时间:2023-06-07 09:36:18浏览次数:46  
标签:daemon container -- could sudo driver apt nvidia runtime

docker 19之后的版本

1. nano nvidia.sh

sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
  sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update

2. sh nvidia.sh

3. apt install nvidia-container-runtime

3. 验证

root@zhangjj:~# which nvidia-container-runtime
/usr/bin/nvidia-container-runtime

4. 重新启动容器

配置容器的启动脚本如下:

docker run --gpus=all -itd -p 5555:5555 -p 41451:41451  -e DISPLAY=$DISPLAY -v /home/ubuntu/dev:/airsim_dev -v /tmp/.X11-unix:/tmp/.X11-unix --privileged=true --network=uav-default --ip 172.18.0.2 --name ue ue:0.1   /bin/bash

启动:

 

标签:daemon,container,--,could,sudo,driver,apt,nvidia,runtime
From: https://www.cnblogs.com/youran-he/p/17462357.html

相关文章