当前位置:网站首页>Jetson Xavier NX (3) bazel mediapipe installation
Jetson Xavier NX (3) bazel mediapipe installation
2022-04-23 08:09:00 【Nysun11】
One 、 install Bazel
1 - download
2 - Copy and unzip
3 - Installation dependency
sudo apt-get install build-essential openjdk-8-jdk
If you can't locate openjdk-8-jdk Should be apt The source of the problem , Revise it yourself , You can refer to my previous blog
4 - compile
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
It will take longer , Wait patiently ( Turn on maximum performance mode )
5 - The generated bazel Files in PATH Directory
sudo cp output/bazel /usr/local/bin/
Check the
bazel --version
Two 、Mediapipe install
1 - download
git clone https://github.com/google/mediapipe.git
2 - Upload and unzip
3 - Installation dependency
sudo apt install -y python3-dev
sudo apt install -y cmake
4 - Delete unnecessary modules
Get into mediapipe Under the folder , Remove unnecessary modules and flags
cd mediapipe
sed -i -e "/\"imgcodecs\"/d;/\"calib3d\"/d;/\"features2d\"/d;/\"highgui\"/d;/\"video\"/d;/\"videoio\"/d" third_party/BUILD
sed -i -e "/-ljpeg/d;/-lpng/d;/-ltiff/d;/-lImath/d;/-lIlmImf/d;/-lHalf/d;/-lIex/d;/-lIlmThread/d;/-lrt/d;/-ldc1394/d;/-lavcodec/d;/-lavformat/d;/-lavutil/d;/-lswscale/d;/-lavresample/d" third_party/BUILD
5 - modify BUILD file
open /mediapipe/third_party/BUILD
# Locate the
“WITH_WEBP”: “OFF”,
# Add the following two sentences after :
“ENABLE_NEON”: “OFF”,
“WITH_TENGINE”: “OFF”,
6 - modify OpenCV and FFMpeg The compiled file of
stay mediapipe Execute the following code
sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/g" third_party/opencv_linux.BUILD
sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/g" third_party/ffmpeg_linux.BUILD
7 - Install compiler protobuf-compiler
download , Note that linux-aarch64.zip ending
And then protobuf-compilerv3.19.1 Medium “bin” and include Under the “google” Copied to the mediapipe Next And modify it mediapipe/setup.py
protoc_command = [self._protoc, ‘-I.’, ‘–python_out=.’, source]
It is amended as follows :( Pay attention to the English format of symbols )
protoc_command = [self._protoc, ‘-I.’, ‘-I/usr/local/include’,’–python_out=.’, source]
8 - gcc Is the version 8, If not, please upgrade ( Failure to upgrade will result in an error , It's all tears , Please be sure to upgrade )
sudo apt-get update
sudo apt-get install gcc-8
sudo apt-get install g++-8
cd /usr/bin
sudo rm gcc g++
sudo ln -s gcc-8 gcc
sudo ln -s g++-8 g++
If you report an error, come back and upgrade gcc, If you continue to execute the compiled file , You'll report a mistake again this rule is missing dependency declarations for the following fles Clean up the cache and continue :
sudo rm -rf ~/.cache/bazel/
9 - compile
Use science as much as possible
, Otherwise, the download package will be interrupted or something , Be patient and try again …
stay mediapipe perform :
python3 setup.py gen_protos && python3 setup.py bdist_wheel
After a long time, I will be in a dist Folder generation .whl file
10 - install
Enter your virtual environment ( If there is )
pip install *****.whl
At the end :
The whole process is intermittent many times , Refer to several articles , Thank you
I try to surf the Internet scientifically on the computer and then turn on WiFi To the development board , It turns out that this won't work
I am using python36 If a friend wants mine whl You can send a private message or leave a message
版权声明
本文为[Nysun11]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230641097759.html
边栏推荐
- NLLLoss+log_SoftMax=CE_Loss
- Redis transaction implements optimistic locking principle
- LeetCode 1611. 使整数变为 0 的最少操作次数
- 在线YAML转XML工具
- Construction of middleman environment mitmproxy
- nacos源码分析思路
- Intranet penetration series: icmptunnel of Intranet tunnel (Master James Barlow's)
- Go语学习笔记 - 数组 | 从零开始Go语言
- strcat()、strcpy()、strcmp()、strlen()
- Face to face summary 2
猜你喜欢
sentinel集成nacos动态更新数据原理
Three minutes to teach you to use Houdini fluid > > to solve particle fluid droplets
三星,再次“西征”
如何在SQL Server中导入excel数据,2019版
Principle of sentinel integrating Nacos to update data dynamically
Concours de compétences en informatique en nuage - - première partie de l'environnement cloud privé openstack
[极客大挑战 2019]Havefun1
云计算技能大赛 -- openstack私有云环境 第一部分
[untitled]
利用sqlmap注入获取网址管理员账号密码
随机推荐
[go] common concurrency model [generic version]
Intranet penetration series: pingtunnel of Intranet tunnel
1216_ MISRA_ C standard learning notes_ Rule requirements for control flow
Intranet penetration series: icmptunnel of Intranet tunnel (Master James Barlow's)
Redis -- why is the string length of string emstr the upper limit of 44 bytes?
Brief description of CPU
Face to face summary 2
Interview learning route
Ctf-misc learning from start to give up
How does feign integrate hystrix
惨了,搞坏了领导的机密文件,吐血分享备份文件的代码技巧
Hierarchical output binary tree
SAP tr manual import system operation manual
Three minutes to teach you to use Houdini fluid > > to solve particle fluid droplets
RAID0和RAID5的创建和模拟RAID5工作原理
Ctf-misc summary
Solidity IDE Remix中文版使用手册
Research on software security based on NLP (2)
利用sqlmap注入获取网址管理员账号密码
MySQL——第一章节(MySQL中的数据类型)