frigate icon indicating copy to clipboard operation
frigate copied to clipboard

Support for Nvidia Jetson JetPack 6

Open mvdberge opened this issue 1 year ago • 3 comments

Describe what you are trying to accomplish and why in non technical terms It would be great to have support for the Nvidia JetPack 6 for the Nvidia Jetson modules which was released end of 2023.

Describe the solution you'd like Port the JetPack 5 support to JetPack 6.

Describe alternatives you've considered I don't see any alternatives apart from not supporting JetPack 6.

Additional context I would be willing to contribute if help is wanted. I have a little knowledge about the Jetsons and Docker, but am willing to invest some time here to learn. Some kickstart from @madsciencetist might be needed I think ;-) I have different Nvidia Jetson modules available for testing.

mvdberge avatar Jul 03 '24 09:07 mvdberge

Fixed by #11321

madsciencetist avatar Jul 03 '24 13:07 madsciencetist

Is there a docker image we could pull from the registry?

bogdanr avatar Jul 13 '24 17:07 bogdanr

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 13 '24 00:08 github-actions[bot]

up on @bogdanr query, would be interested in one too

fpaupier avatar Sep 20 '24 11:09 fpaupier

Hi @blakeblackshear would you be open to a PR addressing this this topic, if I propose an implementation ? Goal would be to enable a docker image with jp6 support

fpaupier avatar Oct 07 '24 13:10 fpaupier

Sure, just be aware of the challenges from the last PR attempt: https://github.com/blakeblackshear/frigate/pull/11321

blakeblackshear avatar Oct 07 '24 13:10 blakeblackshear

I notice the base images have been updated. Does this mean it now becomes possible/easier to get a JetPack 6.x build working? I am looking into trying to get this working myself, but it seems way more complicated than I initially expected 😅 Do you guys have any advice for me? I think I should use nvcr.io/nvidia/l4t-tensorrt:r10.3.0-runtime as the base image in trt.mk?

LanderN avatar Feb 11 '25 15:02 LanderN

yes, should definitely be easier now with Frigate using debian 12 as the base image

NickM-27 avatar Feb 11 '25 16:02 NickM-27

I had some time to look into this and came up with something that seems to work (at least on my Jetson Orin Nano devkit). You can see the changes here: https://github.com/blakeblackshear/frigate/compare/dev...LanderN:frigate:jp6-2

I think it might need some tweaks to get it into an acceptable state though. Should I open a PR to discuss the changes?

(Also, I assume this no longer works for jp4 and jp5, should we keep these in the repo?)

LanderN avatar Feb 13 '25 13:02 LanderN

You can see the changes here: https://github.com/blakeblackshear/frigate/compare/dev...LanderN:frigate:jp6-2

Feel free to open a PR, but it will need to be running python 3.11 using deadsnakes, python 3.10 will likely cause issues

(Also, I assume this no longer works for jp4 and jp5, should we keep these in the repo?)

I don't know anything about this. Will most users be able to update to jp6 or how will this work? realistically the builds won't work right now for 0.16 so anything is an improvement.

NickM-27 avatar Feb 13 '25 13:02 NickM-27

Feel free to open a PR, but it will need to be running python 3.11 using deadsnakes, python 3.10 will likely cause issues

Hmm, okay, then I'll first try to upgrade the Python version before opening the PR.

I don't know anything about this. Will most users be able to update to jp6 or how will this work? realistically the builds won't work right now for 0.16 so anything is an improvement.

Honestly, this is my first experience with the Jetson hardware too, so I don't know how common jetpack upgrades are for "deployed" devices. I'd guess it's probably acceptable to drop support for older jetpack versions and have 0.15.x be the last release that supports jp4 and 5.

LanderN avatar Feb 13 '25 13:02 LanderN

Looks like Jetpack 4 is officially EOL so there is no need to support that anymore.

According to Gemini:

That's a great question, and it gets at the heart of how NVIDIA supports its Jetson platform! Here's the breakdown:

Generally, yes, most hardware that runs JetPack 5 will also run JetPack 6.

NVIDIA aims for backward compatibility within its Jetson lines. 1 This means that if you have a Jetson device that's compatible with JetPack 5, there's a very good chance it will also be compatible with JetPack 6.  

So this will include some work for existing users but in general I think it is reasonable to only support Jetpack 6 for starters and if another community member is able to make jetpack 5 work then that is fine too

NickM-27 avatar Feb 13 '25 14:02 NickM-27

The support for older JetPack versions might still be interesting, as the newer JetPack versions drop support for older hardware. Here is the reference list: https://developer.nvidia.com/embedded/jetpack-archive Therefore, if not too complicated, I would propose to not drop the support of older JetPack versions.

mvdberge avatar Feb 14 '25 11:02 mvdberge

Jetpack is a community supported platform, we can only support what the community is able to implement

NickM-27 avatar Feb 14 '25 12:02 NickM-27

For me it works just fine now with this docker image which I suppose will be the base for next version: ghcr.io/blakeblackshear/frigate:6e79ec1-tensorrt-jp6 CPU usage on Jetson Orin Nano is half now: Image

bogdanr avatar Apr 20 '25 09:04 bogdanr

hey @bogdanr, mind you share your config file? it seems it's not using gpu in my case... and if I set

hwaccel_args: preset-jetson-h264

then ffmpeg won't even load

acalatrava avatar Jun 10 '25 21:06 acalatrava