kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
28.72k stars 4.81k forks source link

Advice user to use --gpus instead of gpu-addon on docker driver #19114

Open sivanaikk opened 1 week ago

sivanaikk commented 1 week ago

What Happened?

I am trying to integrate GPU with Minikube, My host machine is Windows and I am using docker desktop in wsl2 and trying to provision Minikube with the support of GPU.

I was able to integrate GPU with docker,

sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

image

minikube start --driver=docker --addons=ingress --addons=nvidia-gpu-device-plugin image

image

Attach the log file

log.txt

Operating System

Windows

Driver

Docker

step I followed

Medium Link

medyagh commented 1 week ago

@sivanaikk that addon is mean for KVM driver and sorry that minikube did not Warn and advice correctly, this is something we could work on for a better user experience

for docker driver please use --gpus flag

I think the right thing is to Rename this flag to kvm-nvidia-gp and then still accept the people using old name (deprciated name) but for new users it wont be confusing

sivanaikk commented 5 days ago

Thank you @medyagh. It's working now!

minikube start --gpus all --driver=docker --addons=ingress

image

medyagh commented 2 days ago

seems like we have 3 addons, two of them are for KVM and one is for docker, it is important that we figure out if we can merge some of them

| nvidia-device-plugin | minikube | disabled | 3rd party (NVIDIA) | | nvidia-driver-installer | minikube | disabled | 3rd party (Nvidia) | | nvidia-gpu-device-plugin | minikube | disabled | 3rd party (Nvidia) |

https://minikube.sigs.k8s.io/docs/tutorials/nvidia/#docker

in our tutorial seems like, for KVM we need:

for "none" we use:

so the LEAST we we should do is have a description that this is for KVM only but ideally we could merge "nvidia-gpu-device-plugin" and "nvidia-device-plugin" so they be one