Install Tensorflow on JetPack 4.6.1 on Xavier nx

Hi,

I’m running into dependency trouble installing TensorFlow on Xavier nx with JetPack version 4.6.1.
I followed above post but i am getting dependency trouble with

desktop:~$ sudo -H pip3 install --extra-index-url https:/
/developer.download.nvidia.com/compute/redist/jp/v461 tensorflow==2.7.0+nv22.01
Collecting tensorflow==2.7.0+nv22.01
Using cached https: //developer.download.nvidia.com/compute/redist/jp/v461/tensorflow/tensorflow-2.7.0+nv22.1-cp36-cp36m-linux_aarch64.whl
Collecting grpcio<2.0,>=1.24.3 (from tensorflow==2.7.0+nv22.01)
Using cached https:/
/files.pythonhosted.org/packages/81/9a/6b33e8d15850356772f0ee6489bc8346a7aa90f0c86733283e139740865e/grpcio-1.48.2.tar.gz
Collecting tensorboard~=2.6 (from tensorflow==2.7.0+nv22.01)
Using cached https:/ /files.pythonhosted.org/packages/80/49/a5ec29886ef823718c8ae54ed0b3ad7e19066b5bf21cec5038427e6a04c4/tensorboard-2.10.1-py3-none-any.whl
Collecting h5py~=3.1.0 (from tensorflow==2.7.0+nv22.01)
Using cached https:/ /files.pythonhosted.org/packages/a7/81/20d5d994c91ed8347efda90d32c396ea28254fd8eb9e071e28ee5700ffd5/h5py-3.1.0.tar.gz
Collecting astunparse~=1.6.3 (from tensorflow==2.7.0+nv22.01)
Using cached https: //files.pythonhosted.org/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl
Collecting absl-py==0.12.0 (from tensorflow==2.7.0+nv22.01)
Using cached https:/ /files.pythonhosted.org/packages/92/c9/ef0fae29182d7a867d203f0eff8296b60da92098cc41db33a434f4be84bf/absl_py-0.12.0-py3-none-any.whl
Collecting protobuf>=3.9.2 (from tensorflow==2.7.0+nv22.01)
Using cached https:/ /files.pythonhosted.org/packages/6c/be/4e32d02bf08b8f76bf6e59f2a531690c1e4264530404501f3489ca975d9a/protobuf-4.21.0-py2.py3-none-any.whl
protobuf requires Python ‘>=3.7’ but the running Python is 3.6.9

I tried

pip install protobuf==3.19.6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: protobuf==3.19.6 in ./.local/lib/python3.6/site-packages (3.19.6)

but this issue still persists

Hi,

For JetPack 4, please check the command below:

Thanks.

Thank you very much, i installed the Tensorflow.
but i think something went wrong with library versions

i am running yolov8 with DeepSORT from here (Google Colab) and here (GitHub - nwojke/deep_sort: Simple Online Realtime Tracking with a Deep Association Metric)

When i run only detection it works fine but if i try to run detection with tracking then the detection stops working

below errors are shown

2023-12-11 14:56:43.798248: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero

[12/11/2023-14:56:58] [TRT] [E] 1: [convolutionRunner.cpp::execute::391] Error Code 1: Cask (Cask convolution execution)
[12/11/2023-14:56:58] [TRT] [E] 1: [checkMacros.cpp::catchCudaError::272] Error Code 1: Cuda Runtime (invalid resource handle)

Are above errors due to incomplete installation or am i missing something here ?

Update:
Maybe below information is helpful

import tensorflow as tf
tf.version
‘2.7.0’
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
2023-12-11 16:04:31.785257: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:31.942276: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:31.942663: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:36.039255: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:36.039651: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:36.039954: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-12-11 16:04:36.040206: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:0 with 1160 MB memory: → device: 0, name: Xavier, pci bus id: 0000:00:00.0, compute capability: 7.2
[name: “/device:CPU:0”
device_type: “CPU”
memory_limit: 268435456
locality {
}
incarnation: 5050225483167486791
xla_global_id: -1
, name: “/device:GPU:0”
device_type: “GPU”
memory_limit: 1217306624
locality {
bus_id: 1
links {
}
}
incarnation: 14298530861214289863
physical_device_desc: “device: 0, name: Xavier, pci bus id: 0000:00:00.0, compute capability: 7.2”
xla_global_id: 416903419
]

Hi,

Could you check which TensorFlow version is required for GitHub?
Since JetPack 4 is quite old, you might need to upgrade your environment with JetPack 5 to install a newer TensorFlow version.

Thanks.

Hey,
Thank you for the response
i want it to run on jetpack 4
is there any suggested environment where yolov8 and deepsort will together ?

Hi,

The latest CUDA for JetPack is 10.2 and TensorFlow is v2.7.
Please check with the sample owner to see if this can meet the minimal requirement to run the sample.

Thanks.

Hey @AastaLLL thanks for the response
I have chosen an alternative to the deepsort

while i am working on it, i am facing issue with opencv-contrib

i tried two methods for installation,

method 1)
pip install opencv-contrib-python
installation complete but gives error
cv2.error: OpenCV(4.8.1) /tmp/pip-install-z660e8c4/opencv-contrib-python_674f7d319ad24b50af5e9b5bb8927eae/opencv/modules/highgui/src/window.cpp:1338: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function ‘cvWaitKey’

method 2)
i followed
github.com/AastaNV/JEP/blob/master/script/install_opencv4.5.0_Jetson.sh

but building not finished

the current cv2 i am using is

cv2.version
‘4.1.1’
cv2.file
‘/usr/lib/python3.6/dist-packages/cv2/python-3.6/cv2.cpython-36m-aarch64-linux-gnu.so’

any solution for above ?

Hi,

What kind of issues or errors when using method 2?

Thanks.

@AastaLLL thank you for the response,
it seems there was library dependency issue
i was able to install tensorflow using official documentation

Thank you

Hi,

Would you mind sharing the error logs with us so we can know more about your problem?

Thanks.

Hey @AastaLLL ,
Thank you for the response,
sorry, i do not have the error logs.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.