Skip to content

Commit

Permalink
fix(installer): enable-nvidia-device (tkestack#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxiaoliang authored Aug 31, 2020
1 parent df92a5c commit 1d4dcf8
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ spec:
nodeSelector:
nvidia-device-enable: enable
hostPID: true
initContainers:
- name: nvidia-uvm-enable
image: {{ .BusyboxImage }}
command: ["sh", "-c"," /sbin/modprobe nvidia-uvm 2>/dev/null && mknod -m 666 /dev/nvidia-uvm c `grep nvidia-uvm /proc/devices | awk '{print $1}'` 0 2>/dev/null || echo 0"]
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
readOnly: true
- mountPath: /dev
name: dev
containers:
- name: gpu-manager
image: {{ .GPUManagerImage }}
Expand Down Expand Up @@ -103,6 +116,14 @@ spec:
fieldRef:
fieldPath: spec.nodeName
volumes:
- name: lib-modules
hostPath:
type: Directory
path: /lib/modules
- name: dev
hostPath:
type: Directory
path: /dev
- name: device-plugin
hostPath:
type: Directory
Expand Down

0 comments on commit 1d4dcf8

Please sign in to comment.