Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need to rebuild the mediapipe wheel #5

Open
andres-ramirez-duque opened this issue Feb 9, 2024 · 5 comments
Open

I need to rebuild the mediapipe wheel #5

andres-ramirez-duque opened this issue Feb 9, 2024 · 5 comments

Comments

@andres-ramirez-duque
Copy link

Hi Dear Lanzani,

Thanks for your help maintaining jetson-docs,

I need to rebuild the mediapipe0.10.7 - python3.8 wheel to run some algorithms using ssh sessions on remote terminals.

Can you share the steps to build the wheel?

Regards
AR

@lanzani
Copy link
Owner

lanzani commented Feb 9, 2024

Hi! Thank you :)

The steps I've used to build mediapipe are described in this dockerfile.

I have the same problem as you in one of my projects: I need to run mediapipe headless, but I did not find a working solution yet. If you manage to make it works, let me know, and I will add your contribution to jetson docs!

:)

P.S. If you like the project, consider to leave a star, so more developers can find this resource :)

@andres-ramirez-duque
Copy link
Author

Hi Dear Lanzani,

After a difficult week, I think I have managed to create the wheel by enabling headless running; however, when I run the test script, the following msg is shown:

Created TensorFlow lite XNNPACK delegate for CPU

How can I enable/test GPU support?

I followed all your steps, and I compiled using MEDIAPIPE_DISABLE_GPU=0; as far as I saw, the wheel was created fine.

Any thoughts?

Regards
Andrés

@lanzani
Copy link
Owner

lanzani commented Feb 15, 2024

Hello!

Uhm, if you see that message, it can be that something went wrong with the GPU build because it should be already enabled.

May I ask you on which device are you running it?

Also, to reproduce the issue can be useful to have the steps you went through in order to build the wheel, so if you want to share the process I will test it and see what can be the problem.

:)

@andres-ramirez-duque
Copy link
Author

Hi,

I'm using a Jetson Nano developer Kit with 4GB; I made a fresh install of JetPack 4.6.4 (L4T 32.7.4)

I followed all the steps to install OpenCV 4.8 from:
https://github.com/lanzani/jetson-libraries/blob/main/libraries/opencv/l4t32.7.1/py3.8.0/ocv4.8.0/build_opencv/Dockerfile

Later, I made the mediapipe wheel from:
https://github.com/lanzani/jetson-libraries/blob/main/libraries/mediapipe/l4t32.7.1/py3.8.0/mp0.10.7/build_mediapipe/Dockerfile

The only change I made was to delete the "optional" keyword from a proto file because the build crashed.

I used the following env variables:

export PYTHONPATH=/usr/local/lib/python3.8/site-packages
export TF_CUDA_PATHS=/usr/local/cuda-10.2:/usr/lib/aarch64-linux-gnu:/usr/include
export MEDIAPIPE_DISABLE_GPU=0
export MEDIAPIPE_OMIT_EGL_WINDOW_BIT=1

The jtop info shows:

CUDA: 10.2.300
cuDNN: 8.2.1.32
TensorRT: 8.2.1.8
VPI: 1.2.3
Vulkan: 1.2.70
OpenCV: 4.8.0 with CUDA: YES

Thanks
Cheers
Andrés

@lanzani
Copy link
Owner

lanzani commented Feb 20, 2024

Hello!
Sadly, I wasn't able to make mediapipe work without a display.

In one of my projects tho, I have the need to run mediapipe on a jetson that doesn't have a display plugged in, and my friend @FIGIO55 found a workaround that works. Maybe he can share here his approach :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants