...
It is highly recommended to install Tensorflow inside a virtual environment using Conda or virtualenv, here is a simple example using virtualenv:
...
Begin by installing the nvidia-cuda-toolkit:
Code Block |
---|
sudo apt update sudo apt upgrade sudo apt install openjdk-11-jdk sudo apt install nvidia-cuda-toolkit |
After installing the nvidia-cuda-toolkit, you can now install cuDNN 78.64.5 by 0 by downloading it from this link. You’ll be asked to login or create an NVIDIA account. After logging in and accepting the terms of cuDNN software license agreement, you will see a list of available cuDNN software.
Once downloaded, untar the file, copy its ingredients to your cuda libraries and change permissions:
Code Block |
---|
tar -xvzfxvf cudnn-XXlinux-linux-x64-vXX.tgzx86_64-8.4.0.27_cuda11.6-archive.tar.xz sudo cp cuda-v cudnn-linux-x86_64-8.4.0.27_cuda11.6-archive/include/cudnn.h /usr/liblocal/cuda/include/ sudo cp cuda/lib64 -v cudnn-linux-x86_64-8.4.0.27_cuda11.6-archive/lib/libcudnn* /usr/liblocal/cuda/lib64/ sudo chmod a+r /usr/liblocal/cuda/include/cudnn.h /usr/liblocal/cuda/lib64/libcudnn* echo 'export LD_LIBRARY_PATH=/usr/liblocal/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/usr/liblocal/cuda/include:$LD_LIBRARY_PATH' >> ~/.bashrc export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64 source ~/.bashrc |
Now install Tensorflow with pip:
...