Using tensorflow

Workstation (Ubuntu 20.04, 5950X, rtx3080)

Install CUDA Toolkit

https://developer.nvidia.com/cuda-downloads

These were my options: * Operating System: Linux * Architecture: x86_64 * Distribution: Ubuntu 20.04 * Version: Latest (e.g., CUDA 12.0)

Add CUDA paths

echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

Verify installation

nvcc --version

Install cuDNN

https://developer.nvidia.com/cudnn

Verify your options

Training and optimizing

Install requirements.txt

cd ~/jeteja_robot
pip install -r requirements.txt

Install python virtual environment

sudo apt install -y python3-venv

Create the virtual environment

python3 -m venv tf-gpu
source tf-gpu/bin/activate

Verify TensorFlow and GPU support

python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

Jetson Orin Nano (Jetpack 6.1)

Install tensorflow

https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

or for jp 6.1,

sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v61 tensorflow==2.16.1+nv24.08

You might need to downgrade your numpy.

To test, run the following for GPU support:

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices())"

Possible issue fixes

Set OpenMP Environment Variable

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

Enable TensorFlow’s cuda_malloc_async Allocator

export TF_GPU_ALLOCATOR=cuda_malloc_async

Copying from jetson to powerful computer

Rsync

rsync -avz [source-username]@[source-IP]:/path/to/source/ /path/to/destination/