Skip to content

Instantly share code, notes, and snippets.

@andersx
Last active October 24, 2018 13:58
Show Gist options
  • Select an option

  • Save andersx/19d84dc33e008b45fd2e7a0ac37b6248 to your computer and use it in GitHub Desktop.

Select an option

Save andersx/19d84dc33e008b45fd2e7a0ac37b6248 to your computer and use it in GitHub Desktop.
install pytorch ubuntu 18.04
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-396 nvidia-modprobe
sudo reboot now
#Test with
nvidia-smi
# Install Nvidia drivers from apt with Ubuntu 18.04
sudo ubuntu-drivers autoinstall
# Install CUDA 9.0 from apt with Ubuntu 18.14
sudo apt-install cuda-toolkit-9-0
# For CUDA 9.0 only:
pip3 install torch torchvision
sudo apt-install cuda-9-2
# maybe
sudo apt install nvidia-cuda-toolkit
wget https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda-repo-ubuntu1710-9-2-local_9.2.148-1_amd64
mv cuda-repo-ubuntu1710-9-2-local_9.2.148-1_amd64 cuda-repo-ubuntu1710-9-2-local_9.2.148-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1710-9-2-local_9.2.148-1_amd64.deb
sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
sudo apt-get install cuda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment