From 39fea36ea5958ff1d97dedd8de2ba3c1deeb9263 Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Sat, 21 Mar 2020 17:51:42 +0800 Subject: [PATCH] Update Nvidia GPU plugin --- ...ce-plugin.yaml.tmpl => nvidia-gpu-device-plugin.yaml} | 9 +++------ pkg/minikube/assets/addons.go | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) rename deploy/addons/gpu/{nvidia-gpu-device-plugin.yaml.tmpl => nvidia-gpu-device-plugin.yaml} (84%) diff --git a/deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl b/deploy/addons/gpu/nvidia-gpu-device-plugin.yaml similarity index 84% rename from deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl rename to deploy/addons/gpu/nvidia-gpu-device-plugin.yaml index 96252d1ba5..d4ee2ead9c 100644 --- a/deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl +++ b/deploy/addons/gpu/nvidia-gpu-device-plugin.yaml @@ -46,21 +46,18 @@ spec: hostPath: path: /dev containers: - - image: "{{default "k8s.gcr.io" .ImageRepository}}/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e" - command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"] + - image: "nvidia/k8s-device-plugin:1.0.0-beta4" + command: ["/usr/bin/nvidia-device-plugin", "-logtostderr"] name: nvidia-gpu-device-plugin resources: requests: cpu: 50m memory: 10Mi - limits: - cpu: 50m - memory: 10Mi securityContext: privileged: true volumeMounts: - name: device-plugin - mountPath: /device-plugin + mountPath: /var/lib/kubelet/device-plugins - name: dev mountPath: /dev updateStrategy: diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index 4e20974058..852eb27252 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -296,11 +296,11 @@ var Addons = map[string]*Addon{ }, false, "nvidia-driver-installer"), "nvidia-gpu-device-plugin": NewAddon([]*BinAsset{ MustBinAsset( - "deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl", + "deploy/addons/gpu/nvidia-gpu-device-plugin.yaml", vmpath.GuestAddonsDir, "nvidia-gpu-device-plugin.yaml", "0640", - true), + false), }, false, "nvidia-gpu-device-plugin"), "logviewer": NewAddon([]*BinAsset{ MustBinAsset(