While on most occasions simple pip install tensorflow works just fine, certain combinations of hardware may be incompatible with the repository-installed tensorflow package. In this brief tutorial I will build the latest tensorflow 2.3.1 python package from the source. This tutorial may also be helpfull for those who want to update to the latest tensorflow version on older GPUs because older hardware support was removed from the precompiled version since 2.3.0.

Prepare the building environment

Obtain the following docker container:

docker pull tensorflow/tensorflow:devel-gpu

Choose a place and create a directory that you will share with the container. In my case, I will use /home/alexandr/temp/tensorflow. Then enter the working directory and start the docker container

cd /home/alexandr/temp/tensorflow
docker run -it -w /tensorflow_src -v $(pwd):/share tensorflow/tensorflow:devel-gpu bash

Update the repository within the container and chose the latest stable branch (at the time of writing that was 2.3)

git pull
git checkout r2.3

Next, upgrade pip and install few python dependencies

/usr/bin/python3 -m pip install --upgrade pip
pip3 install six numpy wheel keras_applications keras_preprocessing

#cuda #tensorflow

Tensorflow and CUDA on processors without modern instructions
29.50 GEEK