nvidia-docker 安装

作者:Garany 发布于:2024-05-12
#centos
1.1 安装依赖
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.repo | sudo tee /etc/yum.repos.d/nvidia-container-runtime.repo

1.2 安装nvdia-docker
yum install nvidia-container-runtime
systemctl restart docker

1.3 测试
docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi

我来说说