Update: 2024.02.21, this PKGBUILD is tested for mediapipe 0.10.9, and should also works for the latest master branch.
To build mediapipe for ArchLinux with GPU support by opengl, we need to:
- update rules_apple to version 3.2.1, as this patch do.
- disable unused patch, as this patch do.
- add
cstdint
header, as this patch do, see also gcc 13 doc. - setup opencv4 headers. as this patch do.
- add
--experimental_allow_proto3_optional
toprotoc
command, as this patch do. - set
link_opencv
toTrue
insetup.py
by find and replace. - optionally, set
__version__
insetup.py
to the right release. - update
.bazelversion
to match the bazel version we are using. - build the wheel file with
MEDIAPIPE_DISABLE_GPU=0 python -m build --wheel --no-isolation
, orMEDIAPIPE_DISABLE_GPU=0 python setup.py bdist_wheel
, or just useextra-x86_64-build
to create the package for ArchLinux.
If you would like to build mediapipe with CUDA support, refer to this repo. You will need more modifications if you would like to build mediapipe != 0.10.1 with CUDA support for ArchLinux or other platform.
You could also refer to this post for building mediapipe for Nvidia Jetson Nano platform (zh-cn only).