Skip to content

Commit

Permalink
Merge pull request #17488 from spowelljr/gpuRestart
Browse files Browse the repository at this point in the history
GPUs: Check for existing NVIDIA container toolkit install
  • Loading branch information
medyagh authored Oct 26, 2023
2 parents 68d187f + 292152b commit 53ee133
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/minikube/cruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ func (r *Docker) configureDocker(driver string) error {
// https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
func (r *Docker) installNvidiaContainerToolkit() error {
out.Styled(style.Warning, "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose")
if _, err := r.Runner.RunCmd(exec.Command("dpkg", "-l", "nvidia-container-toolkit")); err == nil {
klog.Info("nvidia-container-toolkit is already installed, skipping install")
return nil
}
out.Styled(style.Toolkit, "Installing the NVIDIA Container Toolkit...")
cmds := []string{
"curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg",
Expand Down

0 comments on commit 53ee133

Please sign in to comment.