Forked from ksopyla/install_nvidia_cuda_ubuntu18.sh
Created
November 3, 2019 21:04
-
-
Save gokalper/1989ca3aaa21a571ac13f882daf78ae5 to your computer and use it in GitHub Desktop.
NVidia Cuda 10 installation for Ubuntu 18.04
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
#!/bin/bash | |
## This gist contains step by step instructions to install cuda v10.0 and cudnn 7.5 in Ubuntu 18.04 | |
## Clean install | |
### If you have previous installation remove it first. | |
sudo apt-get purge nvidia* | |
sudo apt remove nvidia-* | |
sudo rm /etc/apt/sources.list.d/cuda* | |
sudo apt-get autoremove && sudo apt-get autoclean | |
sudo rm -rf /usr/local/cuda* | |
### to verify your gpu is cuda enable check | |
lspci | grep -i nvidia | |
### gcc compiler is required for development using the cuda toolkit. to verify the version of gcc install enter | |
gcc --version | |
# system update | |
sudo apt-get update | |
sudo apt-get upgrade | |
# install other import packages | |
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev | |
# first get the PPA repository driver | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
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-getY install cuda | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment