标签搜索

目 录CONTENT

文章目录

安装NVIDIA Container Toolkit

陈铭
2024-06-18 / 0 评论 / 0 点赞 / 14 阅读 / 165 字 / 正在检测是否收录...

官方文档见:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf

# 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命令看看:
image-1718686635286

0

评论区