# Install various packages sudo apt-get update sudo apt-get upgrade -y # choose “install package maintainers version” sudo apt-get install -y build-essential python-pip python-dev git linux-image-extra-virtual # same sudo reboot # Not sure why this is needed # Blacklist Noveau which has some kind of conflict with the nvidia driver echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf sudo update-initramfs -u sudo reboot # Reboot (annoying you have to do this in 2015!) # Install latest Linux headers sudo apt-get install linux-source linux-headers-`uname -r` # Install CUDA 7.0 wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb chmod +x cuda_7.0.28_linux.run ./cuda_7.0.28_linux.run -extract=`pwd`/nvidia_installers cd nvidia_installers sudo ./NVIDIA-Linux-x86_64-346.46.run sudo modprobe nvidia sudo ./cuda-linux64-rel-7.5.18-19867135.run cd # Install tensorflow sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl # Clone source as well (for examples) git clone https://github.com/tensorflow/tensorflow cd tensorflow/tensorflow/model/image/mnist python convolutional.py # I tensorflow/core/common_runtime/gpu/gpu_device.cc:611] Ignoring gpu device (device: 0, name: GRID K520, pci bus id: 0000:00:03.0) with Cuda compute capability 3.0. The minimum required Cuda capability is 3.5.