yaoyi

docker run --gpus 报错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]].
ERRO[0000] error waiting for container: context canceled

 

#!/bin/bash
# nvidia-container-runtime-script.sh

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

 

posted on 2022-06-22 21:44  yaoyi  阅读(358)  评论(0编辑  收藏  举报

导航