home scroll AI Learning

tensorflow

Installation

Using Ubuntu 22.04.3

https://www.tensorflow.org/install

Install TensorFlow with pip
https://www.tensorflow.org/install/pip

Ubuntu GPU CUDA support

https://www.tensorflow.org/install/gpu
Step 1 - Install Nvidia drivers
Driver version 5.25 seems to work best for me

AdditionalDrivers

Verify by running
nvidia-smi
Step 2 - Install CUDA Toolkit
../CUDA/index.html
Step 3 - Install cuDNN
../CUDnn/index.html
Step 4 - Install Miniconda
../../../techtips/anaconda/index.html
Step 5 - create conda environment
conda create -n test01 python=3.10
activate
conda activate test01
Step 6 - Install CUDA-enabled tensorflow
conda install -c conda-forge tensorflow=2.15.0
Check to make sure that the CUDA packages were installed
conda list
Step 7 - Verify that tensorflow sees the GPU(s)
python3 -c 'import tensorflow as tf; print("Num GPUs Available: ", len(tf.config.list_physical_devices("GPU")))'

Ubuntu GPU docker

https://www.tensorflow.org/install/docker
https://www.tensorflow.org/install/source#docker_linux_builds
https://www.tensorflow.org/install/source#gpu_support_2
"Docker is the easiest way to build GPU support for TensorFlow since the host machine only requires the NVIDIA® driver (the NVIDIA® CUDA® Toolkit doesn't have to be installed). "

Follow Me

discord