k8s使用gpu

Ethereal Lv4

1. 步骤

  • 在物理机上安装驱动

  • 在物理机上安装NVIDIA Container Toolkit并完成配置

    1
    2
    sudo nvidia-ctk runtime configure --runtime=containerd
    sudo systemctl restart containerd
  • 部署nvidia k8s-device-plugin

  • 通过pod资源申请的方式申请gpu(如果需要某特定型号的gpu,那么需要将这台物理机全部变为同种gpu,并通过标签形式让pod调度到这台机器上。)

2. 参考

如何在K8s集群中管理与使用GPU_device-plugin缺点-CSDN博客

K8S Containerd 环境添加NVIDIA Runtime支持k8s 集群部署以及 nvidia驱动安装不再赘述 - 掘金

Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit

NVIDIA/k8s-device-plugin: NVIDIA device plugin for Kubernetes

2024-04-16-centos离线安装nvidia-container-runtime - 简书

调度 GPU | Kubernetes

  • Title: k8s使用gpu
  • Author: Ethereal
  • Created at: 2025-02-24 20:10:57
  • Updated at: 2025-02-24 20:15:53
  • Link: https://ethereal-o.github.io/2025/02/24/k8s使用gpu/
  • License: This work is licensed under CC BY-NC-SA 4.0.
 Comments
On this page
k8s使用gpu