尚未上生产,注意安全
make sure you can compile mediapipe successfully
make sure you can compile mediapipe successfully
make sure you can compile mediapipe successfully
下面描述这个项目的构建过程,方便其他 bazel 项目也参考类似方式去搞。
git submodule init && git submodule update
- change lib/mediapipe/WORKSPACE openCV path
- copy lib/media_wrapper/WORKSPACE to ./WORKSPACE
- replace
workspace(name = "mediapipe")
toworkspace(name = "project_name")
in ./WORKSPACE - add the following in ./WORKSPACE:
local_repository(
name = "mediapipe",
path = "lib/mediapipe"
)
- replace all
@//third_party
to@mediapipe//third_party
in ./WORKSPACE - change yarn_install to in ./WORKSPACE
yarn_install(
name = "npm",
package_json = "@mediapipe//:package.json",
yarn_lock = "@mediapipe//:yarn.lock",
)
- copy file in
lib\mediapipe\.bazelrc
to.\.bazelrc
#PYTHON_BIN_PATH should change.
bazel run --experimental_repo_remote_exec --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:/Users/Administrator/AppData/Local/Microsoft/WindowsApps/python.exe" src:hello_world
中文可参考 https://blog.csdn.net/HW140701/article/details/119546019 来编译 MEDIAPIPE