Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Last active February 28, 2018 22:45
Show Gist options
  • Save ThinGuy/a35ca56fcf572259ea4f48caf6dd333f to your computer and use it in GitHub Desktop.
Save ThinGuy/a35ca56fcf572259ea4f48caf6dd333f to your computer and use it in GitHub Desktop.
Curtin late commands to install cuda drivers
#These commands should go directly under the maas command in the late_commands section in /etc/maas/preseeds/curtin_userdatas
#Spacing matters, copy as is.
nvidia_00_cmd: ["sh", "-c", "echo Blacklist Nouveau and Adding Cuda Drivers."]
nvidia_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "echo", "-en", "blacklist nouveau\noptions nouveau modeset=0\n >> /etc/modeprobe.d/blacklist-nouveau.conf"]
nvidia_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "wget -qO- http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub|apt-key add -"]
nvidia_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /"]
nvidia_04_cmd: ["curtin", "in-target", "--", "sh", "-c", "apt update"]
nvidia_05_cmd: ["curtin", "in-target", "--", "sh", "-c", "DEBIAN_FRONTEND=noninteractive apt install cuda -yq"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment