Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/compute-domain-kubelet-plugin/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (r root) getDriverLibraryPath() (string, error) {
"/lib64",
"/lib/x86_64-linux-gnu",
"/lib/aarch64-linux-gnu",
"/usr/local/glibc/usr/lib",
}

libraryPath, err := r.findFile("libnvidia-ml.so.1", librarySearchPaths...)
Expand All @@ -52,6 +53,7 @@ func (r root) getNvidiaSMIPath() (string, error) {
"/usr/sbin",
"/bin",
"/sbin",
"/usr/local/bin",
}

binaryPath, err := r.findFile("nvidia-smi", binarySearchPaths...)
Expand Down
2 changes: 2 additions & 0 deletions cmd/gpu-kubelet-plugin/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (r root) getDriverLibraryPath() (string, error) {
"/lib64",
"/lib/x86_64-linux-gnu",
"/lib/aarch64-linux-gnu",
"/usr/local/glibc/usr/lib",
}

libraryPath, err := r.findFile("libnvidia-ml.so.1", librarySearchPaths...)
Expand All @@ -52,6 +53,7 @@ func (r root) getNvidiaSMIPath() (string, error) {
"/usr/sbin",
"/bin",
"/sbin",
"/usr/local/bin",
}

binaryPath, err := r.findFile("nvidia-smi", binarySearchPaths...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
- name: NVIDIA_VISIBLE_DEVICES
value: void
- name: CDI_ROOT
value: /var/run/cdi
value: {{ .Values.cdiRoot | quote }}
- name: NVIDIA_MIG_CONFIG_DEVICES
value: all
- name: NODE_NAME
Expand Down Expand Up @@ -174,7 +174,7 @@ spec:
mountPath: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
mountPropagation: Bidirectional
- name: cdi
mountPath: /var/run/cdi
mountPath: {{ .Values.cdiRoot | quote }}
- name: driver-root
mountPath: /driver-root
readOnly: true
Expand Down Expand Up @@ -238,7 +238,7 @@ spec:
- name: NVIDIA_VISIBLE_DEVICES
value: void
- name: CDI_ROOT
value: /var/run/cdi
value: {{ .Values.cdiRoot | quote }}
- name: NVIDIA_MIG_CONFIG_DEVICES
value: all
- name: NODE_NAME
Expand Down Expand Up @@ -277,7 +277,7 @@ spec:
mountPath: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
mountPropagation: Bidirectional
- name: cdi
mountPath: /var/run/cdi
mountPath: {{ .Values.cdiRoot | quote }}
- name: driver-root
mountPath: /driver-root
mountPropagation: HostToContainer
Expand All @@ -303,7 +303,7 @@ spec:
path: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
- name: cdi
hostPath:
path: /var/run/cdi
path: {{ .Values.cdiRoot | quote }}
- name: driver-root-parent
hostPath:
# If nvidiaDriverRoot == "/" then its parent is itself. Otherwise, get
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm/nvidia-dra-driver-gpu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ nvidiaDriverRoot: /
# If not specified, the default path inferred from the nvidia-container-toolkit library version will be used.
nvidiaCDIHookPath: ""

# CDI root directory path.
# This is where CDI spec files are stored and accessed by the runtime.
cdiRoot: "/var/run/cdi"

nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
Expand Down
2 changes: 2 additions & 0 deletions hack/kubelet-plugin-prestart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ validate_and_exit_on_success () {
/driver-root/usr/bin \
/driver-root/usr/sbin \
/driver-root/bin \
/driver-root/usr/local/bin \
/driver-root/sbin \
-maxdepth 1 -type f -name "nvidia-smi" 2> /dev/null | head -n1
)
Expand All @@ -60,6 +61,7 @@ validate_and_exit_on_success () {
/driver-root/usr/lib64 \
/driver-root/usr/lib/x86_64-linux-gnu \
/driver-root/usr/lib/aarch64-linux-gnu \
/driver-root/usr/local/glibc/usr/lib \
/driver-root/lib64 \
/driver-root/lib/x86_64-linux-gnu \
/driver-root/lib/aarch64-linux-gnu \
Expand Down