- Download latest version of driver from NVIDIA
- Remove recently installed drivers
sudo apt-get purge nvidia*
- Log in tty1
- Press Ctrl + Alt + F1
- Type in your username and hit Enter
- Type in your password and hit Enter
- Shut down X server.
# unity
sudo service lightdm stop
# gnome
sudo service gdm stop
- Make the installer file excutable.
chmod +x <path-to-file>
- Run the executable install file
sudo sh <path-to-file>
- Start X server
# unity
sudo service lightdm start
# gnome
sudo service gdm start
You can use Alt + Left to switch back to GUI.
Note: Don’t delete the installer file. You need it to uninstall driver later.
sudo sh <path-to-file> --uninstall
- Download latest version of get-pip.py
- Run the following:
python get-pip.py
- Download cuDNN v4.
- Uncompress archive file and copy files into toolkit directory
tar xvzf <cudnn-file>
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
- Set environment variables. Adding the command below to ~/.bashrc
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
- Activate the env variables
source ~/.bashrc
Reference:
- Before intalling Tensorflow, you should check the latest avaiable version. I use 0.10 as an example.
- Follow instructions from Tensorflow
- Test Tensorflow Installation
import tensorflow as tf
sess = tf.InteractiveSession()
If you don’t run into any error, it means Tensorflow is ready to go on your machine.