Monday, January 18, 2016

ubuntu 14.04 install cuda 7.5

Made with Remarkable!

ubuntu 14.04 install cuda 7.5

In the past blog, I showed that it’s easy to install cuda. While the truth is that, as my laptop has two graphical cards(a intel and nvidia GT850M), it’s really hard to install nvidia driver and CUDA.

Fail trace:

Using the cuda-new-version.run as other blogs says, the installation is successeed, but ubuntu wouldn’t be able to login after entering the password.

Success trace

then I tried to use the local cuda.deb file download from the website: https://developer.nvidia.com/cuda-downloads .

  • follow the steps:

sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb

sudo apt-get update

sudo apt-get install cuda

tips: if you also has two graphical cards, you should use:

sudo service lightdm stop

and then login your account in the tty1 or other ttys except the graphical one.
the use the three step.

  • after the installation of cuda.
    reboot

  • then set the environment variables:

echo ‘export PATH=/usr/local/cuda-7.5/bin:$PATH’ >> ~/.bashrc

echo ‘export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH’ >> ~/.bashrc

source ~/.bashrc

sudo reboot

After reboot. check whether it’s successfully installed:

nvcc -V

if it returns the version of CUDA.
Then congralates.

New tips: It happened to me that ubuntu stops at the screen of logo and it wouldn't let me login.

the problem is caused by the pre-installed open source graphical card driver nouveau, it can be solved by taking them into the blacklist using following steps:

go to the recovery mode and if it shows that the file system is read-only, choose the selection ' root'

mount -o remount, rw /

Then we can modify the files, edit the file /etc/modprobe.d/blacklist and add following lines at the end of it:

blacklist amd76x_edac

blacklist vga16fb

blacklist nouveau

blacklist rivafb

blacklist nvidiafb

blacklistrivatv

all finished~

No comments:

Post a Comment