Created
June 25, 2019 18:23
-
-
Save eldon/5c3fa624c86489aa943c560c1ca828b6 to your computer and use it in GitHub Desktop.
Install ubuntu 18.04.2 with cuda-10.0, docker-ce, and friends
This file contains hidden or 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/bash | |
| # install cuda 10.0 | |
| sudo apt update | |
| sudo apt install -y wget vim build-essential gcc | |
| wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb | |
| sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
| sudo dpkg -i cuda-repo-ubuntu1804_10.1.168-1_amd64.deb | |
| sudo apt-get update | |
| sudo apt-get install cuda-10.0 | |
| # cuda post-installation actions | |
| sudo bash -c "echo 'PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}' >> /etc/environment" | |
| sudo bash -c "echo 'LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> /etc/environment" | |
| sudo systemctl enable nvidia-persistenced | |
| sudo sed -i 's/^SUBSYSTEM=="memory", ACTION=="add"/\#SUBSYSTEM=="memory", ACTION=="add"/g' /lib/udev/rules.d/40-vm-hotadd.rules | |
| # install docker-ce | |
| sudo apt-get update | |
| sudo apt install docker-ce docker-ce-cli containerd.io | |
| sudo usedmod -aG docker `whoami` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment