Last active
November 29, 2017 13:43
-
-
Save karkirowle/23128559933557a248d48bf0e3fae56f to your computer and use it in GitHub Desktop.
Installing cuDNN on Lenovo-Y50 Ubuntu 16.04 - felt this is kind of tricky, it might help some
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
# I had so many troubles getting CUDA 8 on my Lenovo-Y50 Ubuntu 16.04, so here you go, hope this helps a lot of | |
sudo apt-get purge libvdpau-va-gl1 bumblebee* nvidia* | |
# Driver | |
sudo apt-get install nvidia-384 nvidia-settings nvidia-prime | |
# Do a reboot here | |
sudo reboot | |
# Downloads the respective driver | |
cd ~/Downloads | |
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run | |
chmod +x cuda_8.0.61_375.26_linux.run | |
# Run the driver install | |
cd ~/Downloads | |
sudo bash cuda_8.0.61_375.26_linux.run --no-opengl-libs | |
# Control+C skip eula to end | |
# accept | |
# no for the accelerated driver | |
# yes for toolkit, symbolic link. and yes for samples | |
# Download cuDNN v6 from the website | |
# https://developer.nvidia.com/cudnn | |
# Extract cudnn-8.0-linux-x64-v5.1.tgz you will get a folder "cuda" | |
# Make sure to download the right | |
cd ~/Downloads/cuda | |
sudo cp cuda/include/cudnn.h /usr/local/cuda/include | |
sudo cp cuda/lib64/* /usr/local/cuda/lib64 | |
sudo chmod a+r /usr/local/cuda/lib64/libcudnn* | |
# Install tensorflow by activating your virtual environment and installing in gpu-enabled mode | |
# Check tensorflow installation as given on tensorflow installation page | |
# If import tensorflow throws an error for which indicates a libcudnn.so.7 or something like that, try to downgrade or upgrade cuDNN | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those who struggles with verifying cuDNN v7 64-bit installation:
./mnistCUDNN: error while loading shared libraries: libcudart.so.9.0: cannot open shared object file: No such file or directory
CUDA
installation folder is in/usr/local
directory, it can becuda
orcuda-9.0
. You will set the environmental variables accordingly.PATH
variable ($ echo $PATH
) andLD_LIBRARY_PATH
variable ($ echo $LD_LIBRARY_PATH
) and make sure both of it contains/usr/local/cuda/lib64
or/usr/local/cuda-9.0/lib64
In case the you are missing the required
PATH
s use these command below in terminal to add them:$ export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
or$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
or$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}