#Install Tensorflow With GPU Support On Debian 1. As root, ```shell echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" > /etc/apt/sources.list.d/unstable.list apt-get update apt-get install gcc-5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 #to set first priority to gcc-5 (credit: https://gist.github.com/beci/2a2091f282042ed20cda) ``` 2. Install Cuda: ```shell wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run chmod +x cuda_8.0.61_375.26_linux.run # (credit: https://unix.stackexchange.com/a/359670) sh ./cuda_8.0.61_375.26_linux.run --tar mxvf sudo cp InstallUtils.pm /usr/share/perl5/ sudo ./cuda_8.0.61_375.26_linux.run --override # `--override` prevents the installer from caring too much about the gcc versions) # Clean up: rm cuda_8.0.61_375.26_linux.run InstallUtils.pm uninstall_cuda.pl cuda-installer.pl rm -r run_files ``` 3. Add in your `~/.zshrc`: ```shell export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/ ``` 4. Re-login. Install cuDNN v5.1 for Cuda 8.0: ```shell libcudnn5-dev_5.1.10-1+cuda8.0_amd64.deb libcudnn5_5.1.10-1+cuda8.0_amd64.deb ``` 5. Create Conda Env: ```shell conda create -n tf source activate tf pip install --ignore-installed https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp36-cp36m-linux_x86_64.whl ```