Merge pull request #105989 from bobbypage/gpu-test-config

Fix COS GPU driver installation
This commit is contained in:
Kubernetes Prow Robot 2021-10-29 22:59:17 -07:00 committed by GitHub
commit fc6890f902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,15 +2,12 @@
runcmd:
- modprobe configs
# Setup the installation target at make it executable
- mkdir -p /home/kubernetes/bin/nvidia
- mount --bind /home/kubernetes/bin/nvidia /home/kubernetes/bin/nvidia
- mount -o remount,exec /home/kubernetes/bin/nvidia
# Compile and install the nvidia driver (precompiled driver installation currently fails)
- docker run --net=host --pid=host -v /dev:/dev -v /:/root -v /home/kubernetes/bin/nvidia:/usr/local/nvidia -e NVIDIA_INSTALL_DIR_HOST=/home/kubernetes/bin/nvidia -e NVIDIA_INSTALL_DIR_CONTAINER=/usr/local/nvidia -e NVIDIA_DRIVER_VERSION=460.91.03 --privileged gcr.io/cos-cloud/cos-gpu-installer:latest
# Run the installer again, as on the first try it doesn't detect the libnvidia-ml.so
# on the second attempt we detect it and update the ld cache.
- docker run --net=host --pid=host -v /dev:/dev -v /:/root -v /home/kubernetes/bin/nvidia:/usr/local/nvidia -e NVIDIA_INSTALL_DIR_HOST=/home/kubernetes/bin/nvidia -e NVIDIA_INSTALL_DIR_CONTAINER=/usr/local/nvidia -e NVIDIA_DRIVER_VERSION=460.91.03 --privileged gcr.io/cos-cloud/cos-gpu-installer:latest
# Install GPU drivers - https://cloud.google.com/container-optimized-os/docs/how-to/run-gpus
- cos-extensions install gpu
- mount --bind /var/lib/nvidia /var/lib/nvidia
- mount -o remount,exec /var/lib/nvidia /var/lib/nvidia
# Run nvidia-smi to verify installation
- /var/lib/nvidia/bin/nvidia-smi
# Remove build containers. They're very large.
- docker rm -f $(docker ps -aq)
# Standard installation proceeds