Skip to content

Commit

Permalink
Add an initcontainer to device-plugin
Browse files Browse the repository at this point in the history
Signed-off-by: chaunceyjiang <[email protected]>
  • Loading branch information
chaunceyjiang committed May 31, 2024
1 parent 4af7069 commit faaa8c3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions charts/hami/templates/device-plugin/daemonsetnvidia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,40 @@ spec:
priorityClassName: system-node-critical
hostPID: true
hostNetwork: true
initContainers:
- args:
- nvidia-validator
command:
- sh
- -c
env:
- name: WITH_WAIT
value: "true"
- name: COMPONENT
value: driver
image: nvcr.m.daocloud.io/nvidia/cloud-native/gpu-operator-validator:v23.9.0
imagePullPolicy: IfNotPresent
name: driver-validation
resources: {}
securityContext:
privileged: true
seLinuxOptions:
level: s0
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /run/nvidia/driver
mountPropagation: HostToContainer
name: driver-install-path
- mountPath: /run/nvidia/validations
mountPropagation: Bidirectional
name: run-nvidia-validations
- mountPath: /host
mountPropagation: HostToContainer
name: host-root
readOnly: true
- mountPath: /host-dev-char
name: host-dev-char
containers:
- name: device-plugin
image: {{ .Values.devicePlugin.image }}:{{ .Values.version }}
Expand Down Expand Up @@ -128,6 +162,22 @@ spec:
- name: usrbin
hostPath:
path: /usr/bin
- hostPath:
path: /run/nvidia/driver
type: ""
name: driver-install-path
- hostPath:
path: /run/nvidia/validations
type: DirectoryOrCreate
name: run-nvidia-validations
- hostPath:
path: /
type: ""
name: host-root
- hostPath:
path: /dev/char
type: ""
name: host-dev-char
- name: sysinfo
hostPath:
path: /sys
Expand Down

0 comments on commit faaa8c3

Please sign in to comment.