Ubuntu 17.10 Setup for NVIDIA drivers and TensorFlow

 

  1. Install the Ubuntu OS
  2. After booting, disable Wayland
    • sudo vim /etc/gdm3/custom.conf
    • uncomment the according line
  3. Activate the NVIDIA drivers
    • Software & Updates
    • Additional drivers
    • Most recent Nvidia driver
    • Apply
    • Reboot
  4. Double check that the graphics card is activated
    • Nvidia Settings
    • PRIME settings
  5. Install CUDA
    • Download the CUDA Toolkit 8.0 v6 from the NVIDIA website
    • chmod ug+x cuda_8.0*.run
      ./cuda_8.0*.run
    • Do NOT install NVIDIA driver, CUDA toolkit ONLY
  6. Install cuDNN 8.0 v5
    • Download it from the NVIDIA website
    • extract it
    • sudo cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include/
    • sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64
    • sudo chmod a+r /usr/local/cuda-8.0/include/cudnn.h
  7. Set the environment variables
    • vim ~/.bashrc
    • add the following lines:
    • export CUDA_HOME=/usr/local/cuda-8.0
    • export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:$LD_LIBRARY_PATH
  8. Install TensorFlow
    • sudo apt-get install python3-pip python3-dev libcupti-dev
    • sudo pip3 install tensorflow-gpu

About Johann Hagerer

I am a Computer Science Master. Talk to me!
This entry was posted in Computer Pragmatics. Bookmark the permalink.

Leave a comment