Created
November 13, 2019 20:55
-
-
Save agostini01/7fccfa52709a714795a51ee7ac8e866c 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
#install ubuntu 18.04 | |
apt update && apt dist-upgrade -y | |
apt install vim tmux htop git tree curl wget ctags linux-tools-common linux-tools-generic linux-tools-`uname -r` valgrind kcachegrind -y | |
# nvidia drivers | |
cd # changes to root's home folder | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin | |
mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb | |
dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb | |
apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub | |
apt-get update | |
apt-get -y install cuda | |
shutdown -r now # reboots the machine ============================ | |
# nvidia-smi should work now | |
nvidia-smi | |
# docker | |
apt-get update | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update | |
apt-get install docker-ce docker-ce-cli containerd.io | |
# NVIDIA docker | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
apt-get update && apt-get install -y nvidia-container-toolkit | |
# docker run -it --rm -v ${PWD}:/working_dir -w /working_dir --gpus all nvidia/cuda:6.5-devel /bin/bash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment