installing Cuda 8rc. Ubuntu 1604

Install CUDA 8.0.27

  1. download CUDA8 and CUDA patch from NVIDIA

    *( depending on your environment): first simply try to install it with executing .run file. if you get error try to run it using --override. 
  2. if it does not work and you get "unsupported compiler error"

    #it is due to the fact thay Cuda 8.0.27 rc does not support gcc5.4. to install cuda first downgrade gcc/g++

    sudo apt-get install gcc-4.9
    sudo update-alternatives --remove-all gcc
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 10

    sudo apt-get install g++-4.9
    sudo update-alternatives --remove-all g++
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 10

  3. install CUDA toolkit

    sudo chmod +x  cuda_8.0.27_linux.run
    sudo ./cuda_8.0.27_linux.run
  4. install patch to support gcc 5

    sudo ./cuda_8.0.27.1_linux.run
  5. post-install

    export CUDA_HOME=/usr/local/cuda-8.0
    export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH
     
    PATH=${CUDA_HOME}/bin:${PATH}
    export PATH

    #make .conf file,Add following lines to the file and save it:

    sudo nano /etc/ld.so.conf.d/cuda.conf

    /usr/local/cuda/lib64
    /usr/local/cuda/lib

    #Run ldconfig:
    sudo ldconfig
  6. (CUDNN install)

    #First, get the CUDNN stuff from NVIDIA. https://developer.nvidia.com/cuDNN.Then

    tar -xzvf cudnn-X.Y.tgz
    cd cudnn-X.Y/cuda
    sudo cp -r * /usr/local/cuda-8.0
    sudo ldconfig

Tags: UBUNTU, GTX1080, CUDA8, UBUNTU16.04, STRIX, GPU, 1080

Add comment


Security code
Refresh

Free WordPress Themes - Download High-quality Templates