Skip to content

Instantly share code, notes, and snippets.

@windweller
Last active January 3, 2021 18:15
Show Gist options
  • Save windweller/24a2cd3c58b76c6697e74a23885b8194 to your computer and use it in GitHub Desktop.
Save windweller/24a2cd3c58b76c6697e74a23885b8194 to your computer and use it in GitHub Desktop.
GCloud PyTorch CUDA config
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# CUDA installation
vim cuda.sh
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-ubuntu1604.pin
sudo mv cuda-ubuntu1604.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1604-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
bash cuda.sh
# PyTorch CUDA install
conda install pytorch cudatoolkit=10.1 -c pytorch
# CuDNN, need to click on a browser
https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.0.5/10.1_20201106/Ubuntu16_04-x64/libcudnn8_8.0.5.39-1+cuda10.1_amd64.deb
# on fs5
gcloud compute scp libcudnn8_8.0.5.39-1+cuda10.1_amd64.deb training:~/
gcloud compute scp libcudnn8-dev_8.0.5.39-1+cuda10.1_amd64.deb training:~/
sudo dpkg -i libcudnn8_8.0.5.39-1+cuda10.1_amd64.deb
sudo dpkg -i libcudnn8-dev_8.0.5.39-1+cuda10.1_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment