Allow customizing container image path used in NVIDIA GPU addon. (#4229)

pull/4240/head
Kaoet 2019-02-14 19:51:38 +08:00 committed by Kubernetes Prow Robot
parent e03588f431
commit 192f4c4e96
7 changed files with 17 additions and 9 deletions

View File

@ -210,3 +210,8 @@ persistent_volumes_enabled: false
# nvidia_driver_version: "384.111" # nvidia_driver_version: "384.111"
## flavor can be tesla or gtx ## flavor can be tesla or gtx
# nvidia_gpu_flavor: gtx # nvidia_gpu_flavor: gtx
## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
# nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
# nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:eea7309dc4fa4a5c9d716157e74b90826e0a853aa26c7219db4710ddcd1ad8bc
## NVIDIA GPU device plugin image.
# nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"

View File

@ -4,7 +4,10 @@ nvidia_driver_version: "390.87"
nvidia_gpu_tesla_base_url: https://us.download.nvidia.com/tesla/ nvidia_gpu_tesla_base_url: https://us.download.nvidia.com/tesla/
nvidia_gpu_gtx_base_url: http://us.download.nvidia.com/XFree86/Linux-x86_64/ nvidia_gpu_gtx_base_url: http://us.download.nvidia.com/XFree86/Linux-x86_64/
nvidia_gpu_flavor: tesla nvidia_gpu_flavor: tesla
nvidia_url_end: "{{nvidia_driver_version}}/NVIDIA-Linux-x86_64-{{nvidia_driver_version}}.run" nvidia_url_end: "{{ nvidia_driver_version }}/NVIDIA-Linux-x86_64-{{ nvidia_driver_version }}.run"
nvidia_driver_install_container: false nvidia_driver_install_container: false
nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:eea7309dc4fa4a5c9d716157e74b90826e0a853aa26c7219db4710ddcd1ad8bc
nvidia_driver_install_supported: false nvidia_driver_install_supported: false
nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
nvidia_gpu_nodes: [] nvidia_gpu_nodes: []

View File

@ -38,7 +38,7 @@ spec:
hostPath: hostPath:
path: /dev path: /dev
containers: containers:
- image: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e" - image: "{{ nvidia_gpu_device_plugin_container }}"
command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"] command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"]
name: nvidia-gpu-device-plugin name: nvidia-gpu-device-plugin
resources: resources:

View File

@ -48,7 +48,7 @@ spec:
hostPath: hostPath:
path: / path: /
initContainers: initContainers:
- image: "{{nvidia_driver_install_container}}" - image: "{{ nvidia_driver_install_container }}"
name: nvidia-driver-installer name: nvidia-driver-installer
resources: resources:
requests: requests:
@ -63,9 +63,9 @@ spec:
- name: ROOT_MOUNT_DIR - name: ROOT_MOUNT_DIR
value: /root value: /root
- name: NVIDIA_DRIVER_VERSION - name: NVIDIA_DRIVER_VERSION
value: "{{nvidia_driver_version}}" value: "{{ nvidia_driver_version }}"
- name: NVIDIA_DRIVER_DOWNLOAD_URL - name: NVIDIA_DRIVER_DOWNLOAD_URL
value: "{{nvidia_driver_download_url_default}}" value: "{{ nvidia_driver_download_url_default }}"
volumeMounts: volumeMounts:
- name: nvidia-install-dir-host - name: nvidia-install-dir-host
mountPath: /usr/local/nvidia mountPath: /usr/local/nvidia
@ -74,5 +74,5 @@ spec:
- name: root-mount - name: root-mount
mountPath: /root mountPath: /root
containers: containers:
- image: "gcr.io/google-containers/pause:2.0" - image: "{{ pod_infra_image_repo }}"
name: pause name: pause

View File

@ -1,3 +1,3 @@
--- ---
nvidia_driver_install_container: atzedevries/nvidia-centos-driver-installer:2 nvidia_driver_install_container: "{{ nvidia_driver_install_centos_container }}"
nvidia_driver_install_supported: true nvidia_driver_install_supported: true

View File

@ -1,3 +1,3 @@
--- ---
nvidia_driver_install_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:eea7309dc4fa4a5c9d716157e74b90826e0a853aa26c7219db4710ddcd1ad8bc nvidia_driver_install_container: "{{ nvidia_driver_install_ubuntu_container }}"
nvidia_driver_install_supported: true nvidia_driver_install_supported: true

View File

@ -1,3 +1,3 @@
--- ---
nvidia_driver_install_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:eea7309dc4fa4a5c9d716157e74b90826e0a853aa26c7219db4710ddcd1ad8bc nvidia_driver_install_container: "{{ nvidia_driver_install_ubuntu_container }}"
nvidia_driver_install_supported: true nvidia_driver_install_supported: true