Skip to content

Commit

Permalink
Fix nvidia-gpu with kvm-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
betaboon committed Apr 18, 2022
1 parent abe1026 commit e9e3f81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions deploy/addons/gpu/nvidia-driver-installer.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ spec:
value: /usr/local/nvidia
- name: ROOT_MOUNT_DIR
value: /root
- name: NVIDIA_DRIVER_VERSION
value: "390.147"
volumeMounts:
- name: nvidia-install-dir-host
mountPath: /usr/local/nvidia
Expand Down
11 changes: 7 additions & 4 deletions deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ spec:
metadata:
labels:
k8s-app: nvidia-gpu-device-plugin
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
priorityClassName: system-node-critical
tolerations:
Expand All @@ -42,9 +40,12 @@ spec:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
- name: dev
hostPath:
path: /dev
containers:
- image: {{.CustomRegistries.NvidiaDevicePlugin | default .ImageRepository | default .Registries.NvidiaDevicePlugin }}{{.Images.NvidiaDevicePlugin}}
command: ["/usr/bin/nvidia-device-plugin", "-logtostderr"]
command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"]
name: nvidia-gpu-device-plugin
resources:
requests:
Expand All @@ -56,6 +57,8 @@ spec:
drop: ["ALL"]
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
mountPath: /device-plugin
- name: dev
mountPath: /dev
updateStrategy:
type: RollingUpdate
6 changes: 4 additions & 2 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,10 @@ var Addons = map[string]*Addon{
"nvidia-gpu-device-plugin.yaml",
"0640"),
}, false, "nvidia-gpu-device-plugin", "third-party (nvidia)", map[string]string{
"NvidiaDevicePlugin": "nvidia/k8s-device-plugin:1.0.0-beta4@sha256:94d46bf513cbc43c4d77a364e4bbd409d32d89c8e686e12551cc3eb27c259b90",
}, nil),
"NvidiaDevicePlugin": "nvidia-gpu-device-plugin@sha256:4b036e8844920336fa48f36edeb7d4398f426d6a934ba022848deed2edbf09aa",
}, map[string]string{
"NvidiaDevicePlugin": "k8s.gcr.io",
}),
"logviewer": NewAddon([]*BinAsset{
MustBinAsset(addons.LogviewerAssets,
"logviewer/logviewer-dp-and-svc.yaml.tmpl",
Expand Down

0 comments on commit e9e3f81

Please sign in to comment.