Last active
February 5, 2018 21:20
-
-
Save wbuchwalter/5bc82956478ccc8079381c63cfdb24e4 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
apt-get update && apt-get install -y linux-headers-$(uname -r) gcc make | |
rmmod nouveau | |
sh -c "echo \"blacklist nouveau\" >> /etc/modprobe.d/blacklist.conf" | |
update-initramfs -u | |
NVIDIA_DRIVERS_INSTALL_DEST="/usr/local/nvidia" | |
# Create the destination directory and move there | |
mkdir -p "${NVIDIA_DRIVERS_INSTALL_DEST}" | |
cd "${NVIDIA_DRIVERS_INSTALL_DEST}" | |
curl -fLS https://us.download.nvidia.com/tesla/384.111/NVIDIA-Linux-x86_64-384.111.run -o nvidia-drivers-384.111 | |
# the installation script will install some libraries under /usr/lib/x86_64-linux-gnu | |
# since there is no option to control this from the nvidia installer we have to use overlayfs | |
mkdir -p lib64 overlay-workdir | |
mount -t overlay -o lowerdir=/usr/lib/x86_64-linux-gnu,upperdir=lib64,workdir=overlay-workdir none /usr/lib/x86_64-linux-gnu | |
sh nvidia-drivers-384.111 --silent --accept-license --no-drm --utility-prefix="${NVIDIA_DRIVERS_INSTALL_DEST}" --opengl-prefix="${NVIDIA_DRIVERS_INSTALL_DEST}" | |
sudo /usr/local/nvidia/bin/nvidia-smi | |
sudo systemctl restart kubelet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment