Last active
May 30, 2019 13:58
-
-
Save rava-dosa/75a04514ad6864b1eb0eee6c9821143a 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
sudo apt-get --purge remove nvidia-* | |
sudo apt-get autoremove | |
sudo apt-get update | |
sudo gedit /etc/modprobe.d/blacklist-nouveau.conf | |
paste | |
blacklist nouveau | |
blacklist lbm-nouveau | |
options nouveau modeset=0 | |
alias nouveau off | |
alias lbm-nouveau off | |
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf | |
sudo update-initramfs -u | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get dist-upgrade -y | |
sudo apt-get install build-essential | |
sudo apt-get install linux-image-extra-virtual | |
sudo apt-get install linux-source | |
sudo apt-get source linux-image-$(uname -r) | |
sudo apt-get install linux-headers-$(uname -r) | |
wget -O cuda_8_linux.run https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run | |
sudo chmod +x cuda_8_linux.run | |
#in tty ctrl+alt+f1 or ctrl + alt +f6 | |
sudo service lightdm stop | |
#or if you are using gnome 3 then | |
sudo service gdm3 stop | |
sudo ./cuda_8_linux.run | |
#Do you accept the previously read EULA? | |
#accept | |
#Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 367.48? | |
#n (we installed drivers previously) | |
#Install the CUDA 8.0 Toolkit? | |
#y | |
#Enter Toolkit Location: | |
# /usr/local/cuda-8.0 (enter) | |
# Do you wish to run the installation with ‚sudo’? | |
# y | |
# Do you want to install a symbolic link at /usr/local/cuda? | |
# y | |
# Install the CUDA 8.0 Samples? | |
# y | |
# Enter CUDA Samples Location: | |
# enter | |
# Install cuDNN | |
# go to website and download cudnn-8.1 https://developer.nvidia.com/cudnn | |
tar -zxvf cudnn-8.1-linux-x64-v5.1.tgz | |
# copy libs to /usr/local/cuda folder | |
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include | |
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 | |
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt-get install nvidia-375 | |
sudo apt-get install libcupti-dev | |
# Once nvidia driver is installed, restart the computer. You can verify the driver using the following command. | |
cat /proc/driver/nvidia/version | |
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc | |
sudo apt-get install python-numpy python-dev python-pip python-wheel | |
#Download Bazel | |
chmod +x bazel-0.5.2-installer-linux-x86_64.sh | |
./bazel-0.5.2-installer-linux-x86_64.sh --user | |
#paste in bashrc | |
export PATH="$PATH:$HOME/bin" | |
# https://www.anaconda.com/download/ install anaconda | |
# Add these two lines in gedit ~/.bashrc | |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64" | |
export CUDA_HOME=/usr/local/cuda | |
conda create -n tensorflow | |
source activate tensorflow | |
pip install --ignore-installed --upgrade \ https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl | |
#links to follow | |
#https://www.tensorflow.org/install/install_linux | |
#https://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/ | |
#https://medium.com/@vivek.yadav/deep-learning-setup-for-ubuntu-16-04-tensorflow-1-2-keras-opencv3-python3-cuda8-and-cudnn5-1-324438dd46f0 | |
#https://www.linkedin.com/pulse/installing-nvidia-cuda-80-ubuntu-1604-linux-gpu-new-victor | |
#http://www.allaboutlinux.eu/remove-nouveau-and-install-nvidia-driver-in-ubuntu-15-04/ | |
#https://gist.github.com/ksopyla/813a62d6afc4307755e5832a3b62f432 | |
#https://docs.bazel.build/versions/master/install-ubuntu.html#install-on-ubuntu | |
#Basic concepts while installation | |
#Don't install opengl and opencl | |
#Don't do anythin that meses up with Xorg | |
#That is don't do anything that installs a new package or gui manager | |
#https://www.youtube.com/watch?v=1Gd6e5BLkwo&feature=youtu.be | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I followed the procedure for ubuntu 18.04 but when I run python script it throws the following error:
2018-08-26 09:25:18.505743: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2
2018-08-26 09:25:18.507467: E tensorflow/stream_executor/cuda/cuda_driver.cc:397] failed call to cuInit: CUDA_ERROR_UNKNOWN
2018-08-26 09:25:18.507528: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:150] kernel driver does not appear to be running on this host (mohi-VirtualBox): /proc/driver/nvidia/version does not exist