Hi,
I’m trying to extend the nvcr.io/nvidia/l4t-tensorflow:r35.3.1-tf2.11-py3
image with Python 3.10. Our codebase relies on Python 3.10, and rewriting and updating the dependencies to make them compatible with the Jetson Orin NX would be a pain in the ass.
I have installed Python 3.10 from the deadsnakes ppa and Tensorflow 2.11 from the jetpack index. However, when I attempt to list the GPU devices using the custom Tensorflow installation, it returns an empty list.
How can i install Tensorflow inside a L4T Tensorflow container?
Using the +nv
images throws the following error, and using a normal TF version from that repo doesn’t seem to have GPU support.
python -m pip install https://developer.download.nvidia.com/compute/redist/jp/v51/tensorflow/tensorflow-2.11.0+nv23.03-cp38-cp38-linux_aarch64.whl
ERROR: tensorflow-2.11.0+nv23.03-cp38-cp38-linux_aarch64.whl is not a supported wheel on this platform.
Important note about python
and python3
commands:
python
is Python 3.10python3
is the default Python (Python 3.8)
Python 3.8 (Default)
docker run -it --rm --gpus all --runtime nvidia orin:latest python3 -c 'import tensorflow as tf; print(tf.__version__, tf.config.list_physical_devices("gpu"))'
2.11.0 [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Python 3.10
docker run -it --rm --gpus all --runtime nvidia orin:latest python3 -c 'import tensorflow as tf; print(tf.__version__, tf.config.list_physical_devices("gpu"))'
2.11.0 []
Other Info:
cat /etc/nv_tegra_release
# R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
Custom Dockerfile:
FROM nvcr.io/nvidia/l4t-tensorflow:r35.3.1-tf2.11-py3 as BASE
# Add deadsnakes repo
RUN apt update
RUN apt-get install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
# Install Python 3.10
RUN apt update && apt install -y python3.10 python3.10-distutils
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# Replace python shell with python3.10
RUN unlink /usr/bin/python
RUN ln -s /usr/bin/python3.10 /usr/bin/python
RUN python -m pip install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v50 tensorflow==2.11