# Configure the production repository:
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo
# Optionally, configure the repository to use experimental packages:
sudo yum-config-manager --enable nvidia-container-toolkit-experimental
# Install the NVIDIA Container Toolkit packages:
sudo yum install -y nvidia-container-toolkit
systemctl restart docker
安装完成后可以新建一个容器测试一下:
在 https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/supported-tags.md 下查看可用的cuda容器镜像
docker run -it --name test_nvidia_docker --gpus all nvidia/cuda:12.2.2-base-centos7 /bin/bash
进入容器之后可以跑一下nvidia-smi命令看看:
评论区