# Tensorflow Installation
## Linux
Tensorflow installation is still fked up as of Jan2021.
There are docker containers available with right configs but I dont know how to use them.
I managed to install in locally with the following steps[^1]
1. Install the right NVIDIA drivers (or hope the ones you have are good)
2. Install CUDA
`sudo apt isntall nvidia-cuda-toolkit`
3. Check if CUDA is installed and what version it is.
```
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0
```
4. Check where cuda is installed
```
whereis cuda
cuda: /usr/lib/cuda /usr/include/cuda.h /usr/include/cuda
```
5. Download version of cuDNN corresponding to the cuda version from https://developer.nvidia.com/rdp/form/cudnn-download-survey. You need to login
6. Install cuDNN
`tar -xvzf cudnn-11.0-linux-x64-v8.0.5.39.tgz`
7. Add the following to the .zshrc file
```
export LD\_LIBRARY\_PATH=/usr/lib/cuda/lib64:$LD\_LIBRARY\_PATH
export LD\_LIBRARY\_PATH=/usr/lib/cuda/include:$LD\_LIBRARY\_PATH
```
8. `source ~/.zshrc`
## Windows (not tested)
1. Install right NVDIA drivers (or hope the ones you have are good)
2. Use Conda to install tensorflow for gpu
`conda create --name tf tensorflow-gpu`
## Windows
1. Install right NVDIA drivers (or hope the ones you have are good)
2. Install CUDA v11.2
3. Install CUDA v10.2 (yes seriously!)
4.
[^1]https://towardsdatascience.com/installing-tensorflow-gpu-in-ubuntu-20-04-4ee3ca4cb75d