Skip to content

Commit

Permalink
Allow custom NVIDIA CTK path
Browse files Browse the repository at this point in the history
Signed-off-by: Vitaliy Emporopulo <[email protected]>
  • Loading branch information
empovit committed Feb 12, 2024
1 parent 255f9c7 commit b9b9b5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/nvidia-dra-plugin/cdi.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func NewCDIHandler(opts ...cdiOption) (*CDIHandler, error) {
nvcdi.WithMode("nvml"),
nvcdi.WithVendor(h.vendor),
nvcdi.WithClass(h.class),
nvcdi.WithNVIDIACTKPath(h.nvidiaCTKPath),
)
if err != nil {
return nil, fmt.Errorf("unable to create CDI library: %w", err)
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm/k8s-dra-driver/templates/kubeletplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ spec:
resources:
{{- toYaml .Values.kubeletPlugin.containers.plugin.resources | nindent 10 }}
env:
- name: NVIDIA_CTK_PATH
value: "{{ .Values.nvidiaCtkPath }}"
- name: NVIDIA_DRIVER_ROOT
value: "{{ .Values.nvidiaDriverRoot }}"
- name: NVIDIA_VISIBLE_DEVICES
Expand Down
5 changes: 5 additions & 0 deletions deployments/helm/k8s-dra-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# For driver installed directly on a host, a value of `/` is used.
nvidiaDriverRoot: /

# Specify the path of CTK binary (nvidia-ctk) on the host,
# as it should appear in the the generated CDI specification.
# The path depends on the system that runs on the node.
nvidiaCtkPath: /usr/bin/nvidia-ctk

nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
Expand Down

0 comments on commit b9b9b5f

Please sign in to comment.