-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Driver persistence changes #810
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ spec: | |
# use pre-compiled packages for NVIDIA driver installation. | ||
usePrecompiled: false | ||
driverType: gpu | ||
repository: nvcr.io/nvidia | ||
repository: "1837582943" #nvcr.io/nvidia | ||
image: driver | ||
version: "550.90.07" | ||
version: "550.54.17" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this too |
||
imagePullPolicy: IfNotPresent | ||
imagePullSecrets: [] | ||
nodeSelector: {} | ||
|
@@ -18,6 +18,8 @@ spec: | |
useHostMofed: false | ||
gds: | ||
enabled: false | ||
persist: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't want to enable this by default but only when CDI is enabled. Need to handle this in the code to error out accordingly. |
||
installDirectory: '/opt/nvidia/driver' | ||
# Private mirror repository configuration | ||
repoConfig: | ||
name: "" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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: RESTARTS_ENABLED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update this env to |
||
+ 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,12 @@ spec: | |
# always use runc for driver containers | ||
- name: NVIDIA_VISIBLE_DEVICES | ||
value: void | ||
{{- if .Driver.Spec.PersistDriver }} | ||
- name: RESTARTS_ENABLED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. update env. |
||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert this, this was required only for testing using your private image.