forked from NVIDIA/gpu-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.diff
51 lines (51 loc) · 1.76 KB
/
manifest.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff --git a/manifests/state-driver/0500_daemonset.yaml b/manifests/state-driver/0500_daemonset.yaml
index 8ceb7820c..8716d147d 100644
--- a/manifests/state-driver/0500_daemonset.yaml
+++ b/manifests/state-driver/0500_daemonset.yaml
@@ -205,6 +205,12 @@ spec:
# always use runc for driver containers
- name: NVIDIA_VISIBLE_DEVICES
value: void
+ {{- if .Driver.Spec.PersistDriver }}
+ - name: PERSIST_DRIVER
+ value: "true"
+ - name: INSTALL_DIR
+ value: {{ .Driver.Spec.InstallDirectory | default "/opt/nvidia/driver" }}
+ {{- end }}
{{- if deref .Driver.Spec.UseOpenKernelModules }}
- name: OPEN_KERNEL_MODULES_ENABLED
value: "true"
@@ -254,6 +260,14 @@ spec:
{{- end }}
{{- end }}
volumeMounts:
+ {{- if .Driver.Spec.PersistDriver }}
+ - name: install-dir
+ mountPath: {{ .Driver.Spec.InstallDirectory | default "/opt/nvidia/driver" }}
+ - name: lib-modules
+ mountPath: /lib/modules
+ - name: dev
+ mountPath: /dev
+ {{- end }}
- name: run-nvidia
mountPath: /run/nvidia
mountPropagation: Bidirectional
@@ -574,6 +588,18 @@ spec:
readOnly: true
{{- end }}
volumes:
+ {{- if .Driver.Spec.PersistDriver }}
+ - name: install-dir
+ hostPath:
+ path: {{ .Driver.Spec.InstallDirectory | default "/opt/nvidia/driver" }}
+ type: DirectoryOrCreate
+ - name: lib-modules
+ hostPath:
+ path: /lib/modules
+ - name: dev
+ hostPath:
+ path: /dev
+ {{- end }}
- name: run-nvidia
hostPath:
path: /run/nvidia