Skip to content

Instantly share code, notes, and snippets.

@mdasifchand
Last active June 22, 2019 08:38
Show Gist options
  • Save mdasifchand/1684a20a17a7042959c4bf58d4d57865 to your computer and use it in GitHub Desktop.
Save mdasifchand/1684a20a17a7042959c4bf58d4d57865 to your computer and use it in GitHub Desktop.
CUDA and CUDNN on your alienware r3 13
By Mohammed Asif Chand
This is not a tutorial, it's an overview on how reached the solution.
==================================================================================================================================
I spent tons of time figuring this out, and thought this might actually help anyone in need.
It turns out the cuda-9.2 and nvidia 396 on the alienware is not very stable.
I made it work with the said configuration:
cuda-9.0
cudnn-v7.1
nvidia 396 drivers
Method:
I have used this tutorial to install ubuntu 16.04 -> https://github.com/andrewwakeling/alienware-13-r3-ubuntu-16.04.
A small catch is please turn off RAID IN from boot menu to have dual boot enalbed.
if not you will run into initramfs error or sometimes grub not appearing at all on your Linux distro.
----------------------------------------------------------------------------------------------------------------------------------
#Firstly go to nvidia website and download the cuda-9.0, ubuntu 16.04 based *.deb(local): (link below)
#<https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal>
===============================================================================================================================
#press CTRL + ALT + F2
#<login with username and password>
sudo service lightdm stop
cd <cuda-9.0*.deb directory>
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-9.0
#Note: if you just use cuda in the above command 9.2 version is installed automatically by default.
sudo apt-get install nvidia-prime
sudo prime-select intel
sudo prime-select query # this should give you intel as an output
sudo service lightdm restart #login the computer
cd ~ # change directory to home directory
gedit .bashrc #open bashrc file and the below lines 46 and 47 into it.
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}$
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64:/usr/lib/nvidia-396
# I have nvidia-396 installed on my computer
#ideally `nvidia-smi` command should let you know, somehow it doesnt work on mine.
#Download cudnn libRARY, Not all the cudnn versions are compatible with cuda-9.0
# The version I used was cudnn7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment