[feature] cuda installation script for ubuntu

This commit is contained in:
Klesh Wong 2020-08-23 11:12:35 +08:00
parent 766dd34e14
commit 82c3007491
2 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
config/mpv/watch_later/
config/fish/fishd.*
config/fish/fish_variables
config/fish/conf.d/virtualfish-loader.fish
config/ranger/bookmarks
config/ranger/history
config/ranger/tagged

14
ubuntu/install-cuda.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
sudo apt install linux-headers-$(uname -r)
source /etc/lsb-release
if [ "$DISTRIB_RELEASE" = "18.04" ] && [ "$(uname -m)" = 'x86_64' ]; then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
fi