-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use local daemonset manifest for installing Nvidia drivers
Updates sig-scheduling e2e Nvidia GPU tests to install drivers using local manifest by default. Currently the DaemonSet is fetched from the GoogleCloudPlatform/container-enginer-accelerators repo by default. Using a local manifest allows for manually specifying the image cos-gpu-installer image rather than always using latest. A remote manifest can still be fetched by setting NVIDIA_DRIVER_INSTALLER_DAEMONSET env var. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
- Loading branch information
Showing
4 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
test/e2e/testing-manifests/scheduling/nvidia-driver-installer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# This DaemonSet was originally referenced from | ||
# https://github.com/GoogleCloudPlatform/container-engine-accelerators/blob/master/daemonset.yaml | ||
|
||
# The Dockerfile and other source for this daemonset are in | ||
# https://github.com/GoogleCloudPlatform/cos-gpu-installer | ||
|
||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: nvidia-driver-installer | ||
namespace: kube-system | ||
labels: | ||
k8s-app: nvidia-driver-installer | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8s-app: nvidia-driver-installer | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
name: nvidia-driver-installer | ||
k8s-app: nvidia-driver-installer | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: cloud.google.com/gke-accelerator | ||
operator: Exists | ||
tolerations: | ||
- operator: "Exists" | ||
hostNetwork: true | ||
hostPID: true | ||
volumes: | ||
- name: dev | ||
hostPath: | ||
path: /dev | ||
- name: vulkan-icd-mount | ||
hostPath: | ||
path: /home/kubernetes/bin/nvidia/vulkan/icd.d | ||
- name: nvidia-install-dir-host | ||
hostPath: | ||
path: /home/kubernetes/bin/nvidia | ||
- name: root-mount | ||
hostPath: | ||
path: / | ||
initContainers: | ||
- image: gcr.io/cos-cloud/cos-gpu-installer:v20200701 | ||
name: nvidia-driver-installer | ||
resources: | ||
requests: | ||
cpu: 0.15 | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: NVIDIA_INSTALL_DIR_HOST | ||
value: /home/kubernetes/bin/nvidia | ||
- name: NVIDIA_INSTALL_DIR_CONTAINER | ||
value: /usr/local/nvidia | ||
- name: VULKAN_ICD_DIR_HOST | ||
value: /home/kubernetes/bin/nvidia/vulkan/icd.d | ||
- name: VULKAN_ICD_DIR_CONTAINER | ||
value: /etc/vulkan/icd.d | ||
- name: ROOT_MOUNT_DIR | ||
value: /root | ||
volumeMounts: | ||
- name: nvidia-install-dir-host | ||
mountPath: /usr/local/nvidia | ||
- name: vulkan-icd-mount | ||
mountPath: /etc/vulkan/icd.d | ||
- name: dev | ||
mountPath: /dev | ||
- name: root-mount | ||
mountPath: /root | ||
containers: | ||
- image: "k8s.gcr.io/pause:3.2" | ||
name: pause |