当前位置:网站首页>鲲鹏arm服务器编译安装PaddlePaddle
鲲鹏arm服务器编译安装PaddlePaddle
2022-06-24 13:00:00 【番茄小能手】
不废话了,开撸!
官方教程里面很多没有讲解到,安装过程中出现了各种各样的问题,以下是对官方教程的补充,有什么问题,欢迎指正!
一、cmake
Paddle依赖cmake进行编译构建,需要cmake版本>=3.15,如果操作系统提供的源包括了合适版本的cmake,直接安装即可,否则需要源码安装
# 移除之前版本的cmake
yum remove cmake
wget https://github.com/Kitware/CMake/releases/download/v3.16.8/cmake-3.16.8.tar.gz
tar -xzf cmake-3.16.8.tar.gz && cd cmake-3.16.8
./bootstrap && make && sudo make install本人安装过程中遇到了如下错误:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) 
解决办法,使用下面命令安装:
yum install openssl-devel然后再执行一遍cmake安装命令。
二、patchelf
安装官方文档的意思,这个目前还是需要的,流程如下
一定要下载aarch64分支的
git clone -b aarch64 https://github.com/NixOS/patchelf.git
./bootstrap.sh
./configure
make
make check
sudo make install
安装过程中可能会报如下错误:failed to run aclocal: No such file or directory
解决办法,使用下面命令安装:
yum install autoconf
yum install automake然后再执行一遍make安装命令。
三、paddle
流程跟官方一致,但官方用的develop分支的,我这里用的是正式版的分支
git clone -b release/2.3 https://github.com/PaddlePaddle/Paddle.git
cd Paddle
mkdir build && cd build链接过程中打开文件数较多,可能超过系统默认限制导致编译出错,设置进程允许打开的最大文件数:
ulimit -n 4096执行cmake:
Python2环境中命令:
cmake .. -DPY_VERSION=2 -DPYTHON_EXECUTABLE=`which python2` -DWITH_ARM=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF
Python3环境命令:
cmake .. -DPY_VERSION=3 -DPYTHON_EXECUTABLE=`which python3` -DWITH_ARM=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF
错误一:编译过程中可能遇到的错误:Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)

解决办法
https://felaim.blog.csdn.net/article/details/105832560
错误二:没有numpy包

安装numpy也可能出现找不到‘Python.h’文件,解决办法,下载python3的开发包:
yum install python3-devel错误三:

![]()
解决办法:
pip3 install wheel -i https://mirror.baidu.com/pypi/simple
pip3 install protobuf -i https://mirror.baidu.com/pypi/simple 四、make
使用以下命令来编译,注意,因为处理器为ARM架构,如果不加TARGET=ARMV8则会在编译的时候报错。
make TARGET=ARMV8 -j$(nproc)编译成功后进入Paddle/build/python/dist目录下找到生成的.whl包。
make过程中会从git上下载各种包,速度很慢,可以通过这种方式加快包下载:加速github访问和下载 - GitClone
边栏推荐
- win10系统问题
- Jerrys timer0 uses the default pa13 to detect the pulse width [chapter]
- unity 等高线创建方法
- Zhiyuan community weekly 86: Gary Marcus talks about three linguistic factors that can be used for reference in large model research; Google puts forward the Wensheng graph model parti which is compar
- Jericho turns on shouting in all modes to increase mic automatic mute [chapter]
- Redis面试题
- Home office should be more efficient - automated office perfectly improves fishing time | community essay solicitation
- HarmonyOS-3
- The project manager needs to look at six characteristics to build a team
- 2022 recurrent training question bank and answers for hoisting signal Rigger (special type of construction work)
猜你喜欢

Dragon lizard developer said: first time you got an electric shock, so you are such a dragon lizard community| Issue 8

杰理之串口接收 IO 需要设置数字功能【篇】
![Jerry's serial port receiving IO needs to set the digital function [chapter]](/img/04/48e7da42101a53827463d479952f67.png)
Jerry's serial port receiving IO needs to set the digital function [chapter]

遠程辦公之:在家露營辦公小工具| 社區征文

Rasa 3.x 学习系列-非常荣幸成为 Rasa contributors 源码贡献者,和全世界的Rasa源码贡献者共建共享Rasa社区!

Hardware development notes (6): basic process of hardware development, making a USB to RS232 module (5): creating USB package library and associating principle graphic devices

【5G NR】5G NR系统架构

HarmonyOS.2

位于相同的分布式端口组但不同主机上的虚拟机无法互相通信

快手实时数仓保障体系研发实践
随机推荐
杰理之可能出现有些芯片音乐播放速度快【篇】
kotlin 异步流
项目经理搭建团队,需要看6个特征
Eight major trends in the industrial Internet of things (iiot)
These default routes and static routes can not be configured and deployed. What kind of network workers are they!
**Puzzling little problem in unity - light and sky box
Rasa 3. X learning series - it is a great honor to be a source code contributor of Rasa contributors, and to build and share the rasa community with rasa source code contributors all over the world!
2022年施工升降机司机(建筑特殊工种)考试试题及在线模拟考试
pip uninstall all packages except builtin package
快手实时数仓保障体系研发实践
PM也要学会每天反省
【深度学习】NCHW、NHWC和CHWN格式数据的存储形式
杰理之在所有模式下打开喊话增加 mic 自动 mute【篇】
English writing of Mathematics -- Basic Chinese and English vocabulary (common vocabulary of geometry and trigonometry)
Antd checkbox, limit the selected quantity
kotlin 共享可变状态和并发性
Jerry's infrared filtering [chapter]
Kotlin initialization block
一个团队可以既做项目又做产品吗?
2022 coal mine gas drainage operation certificate examination questions and simulation examination