Skip to content

Commit

Permalink
Merge pull request #259 from klueska/fix-envvars-compute-domain-kubel…
Browse files Browse the repository at this point in the history
…et-plugin

Add envars dropped in helm chart refactor when introducing ComputeDomai
  • Loading branch information
klueska authored Feb 26, 2025
2 parents c664187 + 810d8c6 commit 3cbf44c
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,34 @@ spec:
{{- toYaml .Values.kubeletPlugin.containers.computeDomains.securityContext | nindent 10 }}
image: {{ include "nvidia-dra-driver-gpu.fullimage" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- compute-domain-kubelet-plugin
command: ["bash", "-c"]
args:
- |-
# Conditionally mask the params file to prevent this container from
# recreating any missing GPU device nodes. This is necessary, for
# example, when running under nvkind to limit the set GPUs governed
# by the plugin even though it has cgroup access to all of them.
if [ "${MASK_NVIDIA_DRIVER_PARAMS}" = "true" ]; then
cp /proc/driver/nvidia/params root/gpu-params
sed -i 's/^ModifyDeviceFiles: 1$/ModifyDeviceFiles: 0/' root/gpu-params
mount --bind root/gpu-params /proc/driver/nvidia/params
fi
compute-domain-kubelet-plugin
resources:
{{- toYaml .Values.kubeletPlugin.containers.computeDomains.resources | nindent 10 }}
env:
- name: MASK_NVIDIA_DRIVER_PARAMS
value: "{{ .Values.maskNvidiaDriverParams }}"
- name: NVIDIA_CTK_PATH
value: "{{ .Values.nvidiaCtkPath }}"
- name: NVIDIA_DRIVER_ROOT
value: "{{ .Values.nvidiaDriverRoot }}"
- name: NVIDIA_VISIBLE_DEVICES
value: void
- name: CDI_ROOT
value: /var/run/cdi
- name: NVIDIA_MIG_CONFIG_DEVICES
value: all
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down

0 comments on commit 3cbf44c

Please sign in to comment.