if you want to create a GPU node pool in AKS with the latest Ubuntu version (Ubuntu-2204) and the preview image with UseGPUDedicatedVHD=true
to install the NVIDIA driver, you can follow these steps:
First:
Make sure you have the latest Azure CLI version installed.
Second:
Run the following command to create the GPU node pool:
az aks nodepool add
--resource-group <resource-group-name>
--cluster-name <cluster-name>
--name gpunp2
--node-count 1
--node-vm-size Standard_NC6s_v3
--node-taints sku=gpu:NoSchedule
--labels algo=qiefp-linux-gpu-nc6s-v3
--enable-cluster-autoscaler
--min-count 0
--max-count 1
--os-type Linux
--aks-custom-headers UseGPUDedicatedVHD=true
--image-reference publisher=Canonical,offer=0001-com-ubuntu-server-focal,sku=20_04-lts-gen2,p3=VHD
after that , Make sure to replace <resource-group-name> with the name of your resource group and <cluster-name> with the name of your AKS cluster.
Explanation of the command:
--os-type Linux: Specifies that the OS type for the node pool is Linux. --aks-custom-headers UseGPUDedicatedVHD=true: Uses the preview image with UseGPUDedicatedVHD=true to install the NVIDIA driver. --image-reference publisher=Canonical,offer=0001-com-ubuntu-server-focal,sku=20_04-lts-gen2,p3=VHD: Specifies the image reference for the Ubuntu-2204 image. This reference corresponds to the latest Ubuntu version with the GPU-specific VHD image.