Run yolov8 inference on Jetson nano unable to recognize gpu

Is there any known incompatibility issue regarding yolov8 (8. 0.116) requirements and jetson nano set up? When running yolo command line with device=0 , It doesn’t seem to recognize cuda device . I have cuda 10.2 and pytorch 1.9.0 with torchvision 0.10.0 . Python3.7.5, Opencv 4.1.1 and Ubuntu 18.04. Nvcc --version command returns the cuda version and i have added the PATH for /usr/local/cuda/bin including the library, in .bashrc file. However torch.cuda.is_available() returns ‘False’…
Please note that i was able to run yolov5 without problems last year with python3.6 i think or lower.

Hi,

How do you install the PyTorch package?
Do you use our prebuilt package?

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

Thanks.

Thanks for your prompt response. No I did not install it exactly this way. Maybe I will uninstall and install following this link and putting python 3.7. Instead of python3 and torch==1.9.0, correct?
FYI torch was already installed from my previous project with yolov5 which worked but now I had to change python, upgrade to 3.7.5 in order for the yolov8 to work. Pip install Ultralytics also installs torch 1.13, so afterwards I pip install torch==1.9.0… But still cuda wasn’t recognized. Then I tried to uninstall torch and install again using pip install torch==1.9.0… Note that pip show torch and import torch work correctly showing torch 1.9.0 and the corresponding file.

Thank you,
Elizabeth Bellou

Στις Δευ, 12 Ιουν 2023, 11:00 ο χρήστης AastaLLL via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com> έγραψε:

Hi,

The package from pip installer is the CPU version package.
Please install our prebuilt which is located at Index of /compute/redist/jp.

Do you use Nano or the new Orin Nano?
For the 1st Nano which uses JetPack 4, we only provide the prebuilt for python 3.6.

Thanks.

I use Jetson nano 4gb with jetpack 4.6

Thank you,
Elizabeth Bellou

Στις Τρί, 13 Ιουν 2023, 08:20 ο χρήστης AastaLLL via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com> έγραψε:

Hi,

The latest software for Nano is JetPack 4.6.3.
You can try the installation command below:

$ export TORCH_INSTALL=https://developer.download.nvidia.com/compute/redist/jp/v461/pytorch/torch-1.11.0a0+17540c5+nv22.01-cp36-cp36m-linux_aarch64.whl
$ python3 -m pip install --no-cache $TORCH_INSTALL

Thanks.

Thank you for your help, by installing torch this way, I managed to get torch.cuda.is_available() True , however only with python 3.6.9 … Yolov8 run with python >=3.7. I tried installing pytorch with python 3.7.5 there was an error that it is not supported for this platform. You had mentioned this incompatibility for jetpack 4 in your previous answer. Maybe I should reach yolov8 develooers forum.

Thank you,
Elizabeth Bellou

Στις Τετ, 14 Ιουν 2023, 06:02 ο χρήστης AastaLLL via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com> έγραψε:

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