InsightFace installation in l4t-pytorch

Hi, I am trying to build a docker image from dustynv/l4t-pytorch and I would like to use insightface, Does anyone you know where I could find it ? (sorry this is my first post and I don’t know how to properly format).
Here are my requirements :
python 3.11 compatible versions

# numpy<2.0 required for InsightFace ABI compatibility

numpy>=1.24,<2.0.0

onnx>=1.14.0

pillow>=10.0.0

scikit-learn>=1.3.0

psycopg2-binary>=2.9.0

fastapi>=0.104.0

uvicorn[standard]>=0.24.0

python-multipart>=0.0.6

insightface>=0.7.3

onnxruntime>=1.16.0`

Hi,

l4t-pytorch contains more dependencies.
It’s recommended to use pytorch instead.

There is a prebuilt container that can work with JetPack 6.1/6.2:
You can give it a try:
https://hub.docker.com/r/dustynv/pytorch/tags

$ docker pull dustynv/pytorch:2.7-r36.4.0-cu128-24.04

Thanks.

Hi, thanks for your reply ! I tried it but at some point it says

> E: Package 'libgl1-mesa-glx' has no installation candidate

I noticed that the image you mentioned is running with Ubuntu 24 (noble) while I am running Ubuntu 22.04 on my Jetson Orin Nano for which there is a libgl1-mesa-glx.

Do you think it is safe to move my host to 24.04?

Thanks again,

Dominique

NB: Just found this : Installing **libgl1** and **libglx-mesa0** instead of **libgl1-mesa-glx** will result in equivalent behaviour and should work on **Ubuntu 18.04** and newer.

I have the same problem with InsightFace …

Could you recommend some face recognition package working with pytorch and using the GPU? I have implemented InsightFace with CPU only but so slow; I am just trying to find the best combination… (I think it is important to notice that It is face recognition for still pictures not real-life camera!)

Thanks in advance,

Dominique

Hi,

Have you pulled the container?

The system inside the container is 24.04 but it can run on JetPack 6 without issue.
Thanks.

Hi, yes I started the build but it comes to fulfil the requirements I got the message:

=> => # WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip
 => => # ._vendor.urllib3.connection.HTTPSConnection object at 0xffffb0e6e8d0>, 'Connection to pypi.jetson-ai-lab.dev timed out. (connect timeout=100
 => => # 0.0)')': /jp6/cu128/pip/                                                                                                                    
 => => # WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip
 => => # ._vendor.urllib3.connection.HTTPSConnection object at 0xffffb0e0df70>, 'Connection to pypi.jetson-ai-lab.dev timed out. (connect timeout=100
 => => # 0.0)')': /jp6/cu128/pip/

and after all the retries the build fails …
Thanks for your help

Hi, in the end we had to add pip install --no-cache-dir --prefer-binary **--index-url https://pypi.org/simple** -r requirements.txt and we changed for facenet-pytorch instead of InsightFace…
Let’s hope that it will work!
Thanks

Hi,

Does it work with the --no-cache-dir command?
Thanks.

Yes it worked but I think that the key change was --index-url https://pypi.org/simple
Sorry for the delay to reply but I am more interested in the Cuda memory problem at the moment . When starting my facial recognition process I have always to clear the cache otherwise I have messages about not able to allocate memory…
Thanks anyway for asking !

Hi,

It looks like you are facing a different issue now.
Would you mind opening a new topic for clarity?

Thanks.

No, I have no more problem on this topic. This can be closed
Thanks