GPU

[GPU] installing cuda 7.5

공대우냉이 2016. 4. 6. 20:51

** If you install cuda 7.5 version due to tensorflow, you will install cuda 7.0 version and 4.0 version cuDNN.

7.5 version cuda and 5.0 version cuDNN cause to error on excuting tensorflow, especially cnn code.

I recommend you to install 7.0 cuda and 4.0 cuDNN. **

 

 

1. install cuda

1.1 deb (network)

CUDA Repository  [1]

Retrieve the CUDA repository package for Ubuntu 14.04 from the CUDA download site and install it in a terminal.

$ sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb 
$ sudo apt-get update

 if you get the error message in first command, typing this cmd

cuda-7.5 :

$ wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb


if you install cuda-7.0,

$ wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb


CUDA Toolkit

Then you can install the CUDA Toolkit using apt-get.

$ sudo apt-get install cuda

You should reboot the system afterwards and verify the driver installation with the nvidia-settings utility.



1.2 runfile(local)

If you can't download and update file, i recommand download cuda file and installing cuda in runfile(local) mode. following this steps. click the screenshot.

if you finish download file, following 2 steps.

  1. Run `sudo sh cuda_7.5.18_linux.run`
  2. Follow the command-line prompts


if you have this message, go to under steps. [2]

enter image description here

Firstly, you turn off remote users before this steps

  • Hit CTRL+ALT+F1 and login using your credentials.
  • kill your current X server session by typing sudo service lightdm stop or sudo stop lightdm
  • Enter runlevel 3 by typing sudo init 3 and install your *.run file.
  • You might be required to reboot when the installation finishes. If not, run sudo service lightdm start or sudo start lightdm to start your X server again.



2. add path to ~/.bashrc

ex)

export CUDA_HOME=/usr/local/cuda-7.5

export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH


3. check the cuda excutation

$ cuda-install-samples-7.5.sh ~

$ make

it excute for a long time. If end, go steps

$ cd NVIDIA_CUDA-7.5_Samples/0_Simple/simplePrintf/

$ ./simplePrintf


$ cd NVIDIA_CUDA-7.5_Samples/0_Simple/matrixMul

$ ./matrixMul

$ cd NVIDIA_CUDA-7.5_Samples/0_Simple/matrixMulCUBLAS

$ ./matrixMulCUBLAS



------------------------------------------------------------------------------------------------

reference :

[1] http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.5-ubuntu

[2] http://askubuntu.com/questions/149206/how-to-install-nvidia-run