ubuntu install NVIDIA Container Toolkit

  1. 配置仓库
bash 复制代码
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    

如果需要更高级的特性,可以开启实验特性

bash 复制代码
sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list

更新

sql 复制代码
apt-get update

安装最新版本

bash 复制代码
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.17.8-1
  sudo apt-get install -y \
      nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
      nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
      libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
      libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
  1. 容器运行时启用 NVIDIA Container Toolkit

  2. Configure the container runtime by using the nvidia-ctk command:

    ini 复制代码
    sudo nvidia-ctk runtime configure --runtime=containerd

    The nvidia-ctk command modifies the /etc/containerd/config.toml file on the host. The file is updated so that containerd can use the NVIDIA Container Runtime.

    复制代码
    sudo systemctl restart containerd

    参考:

    1. docs.nvidia.com/datacenter/...
    2. github.com/NVIDIA/nvid...
相关推荐
Zane19941 小时前
@property 到底是怎么把方法伪装成属性的?一文吃透 property、staticmethod、classmethod
后端·python
XWalnut2 小时前
SpringBoot快速入门
java·spring boot·后端
用户8181870627462 小时前
第21章 JDBC 异常全集与连接池诊断
后端
Java内核笔记2 小时前
告别第三方库!Spring Boot 4 原生 API 版本控制全解析:4 种策略 + 实战案例
java·后端
神奇小汤圆2 小时前
把Spring Boot 4的Native Image玩明白了,启动3秒变50毫秒的踩坑全记录
后端
东方小月2 小时前
从零开发一个 Coding Agent(五):使用 TypeBox 校验工具参数
前端·人工智能·后端
Scene2163 小时前
Agent Harness、Loop 与 Graph:构建生产级 AI Agent 的三大架构支柱
后端
SomeB1oody3 小时前
【RustyML入门】2.0. 经典机器学习
开发语言·后端·机器学习·rust·教程
就改了3 小时前
SpringBoot 自定义线程池 + 实时监控指标
java·spring boot·后端
暗黑小白3 小时前
脱敏引擎工程化
后端·ai agent