我们此前都是手工部署nvidia-container-runtime,上报gpu信息使用的k8s-device-plugin,这些都是手工部署的,其中nvidia-container-runtime的部署涉及修改containerd的配置文件config.toml文件,比较繁琐,今天我们就来学习下gpu-operator的部署。
首先我们需要安装helm,安装可以查看此前的笔记:https://sulao.cn/post/1022
然后我们就可以开始部署gpu-operator了,整个部署过程比较简单,但是容易超时,我们部署的过程如下
GPU_OPERATOR_VERSION="v25.3.4"
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia
helm install --wait --generate-name \
-n gpu-operator --create-namespace \
nvidia/gpu-operator \
--version=${GPU_OPERATOR_VERSION} \
--set nfd.enabled=true \
--set driver.enabled=false \
--timeout 10m25.3.4是目前的最新版本。由于部署下来镜像拉取也是一个问题,所以我们需要自行提前拉取下镜像和导入,25.3.4版本对应的组件镜像版本如下
registry.k8s.io/nfd/node-feature-discovery:v0.17.3
nvcr.io/nvidia/gpu-operator:v25.3.4
nvcr.io/nvidia/k8s/container-toolkit:v1.17.8-ubuntu20.04
nvcr.io/nvidia/k8s/dcgm-exporter:4.3.1-4.4.0-ubuntu22.04
pull nvcr.io/nvidia/k8s-device-plugin:v0.17.4找网络可靠的地方拉取好了上传到部署K8s的服务器然后导入,再进行gpu-operator的安装。
一些参数设置的释义可以查看官网这个页面:https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html#operator-install-guide
一般的话我们都不使用gpu-operator部署驱动,所以我们设置--set driver.enabled=false,启用自动发现需要添加参数--set nfd.enabled=true
查看gpu-operator的repo、多个repo版本、release和卸载操作如下
helm repo list
helm search repo <repo> --versions
helm list -n gpu-operator
helm uninstall <release-name> -n gpu-operator
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://sulao.cn/post/1141
评论列表