⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
cd python
export ENABLE_ORT_BACKEND=ON
export ENABLE_RKNPU2_BACKEND=ON
export ENABLE_VISION=ON
请根据你的开发版的不同,选择RK3588和RK356X
export RKNN2_TARGET_SOC=RK3588
如果你的核心板的运行内存大于等于8G,我们建议您执行以下命令进行编译。
python3 setup.py build
值得注意的是,如果你的核心板的运行内存小于8G,我们建议您执行以下命令进行编译。
python3 setup.py build -j1
python3 setup.py bdist_wheel
cd dist
pip3 install fastdeploy_python-0.0.0-cp39-cp39-linux_aarch64.whl
当执行python3 setup.py build -j1时报出如下错误Error copying directory from "/home/orangepi/workspace/code/FastDeploy-develop/python/.setuptools-cmake-build/third_libs/install" to "/home/orangepi/workspace/code/FastDeploy-develop/python/fastdeploy/libs/third_libs".
make[2]: [CMakeFiles/copy_third_libraries.dir/build.make:57: CMakeFiles/copy_third_libraries] Error 1
make[1]: [CMakeFiles/Makefile2:103: CMakeFiles/copy_third_libraries.dir/all] Error 2
make: * [Makefile:152: all] Error 2
Traceback (most recent call last):
File "setup.py", line 437, in
license='Apache 2.0')
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(attrs)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "setup.py", line 280, in run
self.run_command('cmake_build')
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "setup.py", line 274, in run
subprocess.check_call(build_args)
File "/home/anaconda/envs/paddle/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', '.', '--', '-j', '1']' returned non-zero exit status 2.
温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度
编译FastDeploy Python SDK过程中 git clone https://github.com/PaddlePaddle/FastDeploy.git cd FastDeploy
如果您使用的是develop分支输入以下命令
git checkout develop
cd python export ENABLE_ORT_BACKEND=ON export ENABLE_RKNPU2_BACKEND=ON export ENABLE_VISION=ON
请根据你的开发版的不同,选择RK3588和RK356X
export RKNN2_TARGET_SOC=RK3588
如果你的核心板的运行内存大于等于8G,我们建议您执行以下命令进行编译。
python3 setup.py build
值得注意的是,如果你的核心板的运行内存小于8G,我们建议您执行以下命令进行编译。
python3 setup.py build -j1
python3 setup.py bdist_wheel cd dist pip3 install fastdeploy_python-0.0.0-cp39-cp39-linux_aarch64.whl 当执行python3 setup.py build -j1时报出如下错误Error copying directory from "/home/orangepi/workspace/code/FastDeploy-develop/python/.setuptools-cmake-build/third_libs/install" to "/home/orangepi/workspace/code/FastDeploy-develop/python/fastdeploy/libs/third_libs". make[2]: [CMakeFiles/copy_third_libraries.dir/build.make:57: CMakeFiles/copy_third_libraries] Error 1 make[1]: [CMakeFiles/Makefile2:103: CMakeFiles/copy_third_libraries.dir/all] Error 2 make: * [Makefile:152: all] Error 2 Traceback (most recent call last): File "setup.py", line 437, in
license='Apache 2.0')
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup( attrs)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "setup.py", line 280, in run
self.run_command('cmake_build')
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/anaconda/envs/paddle/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "setup.py", line 274, in run
subprocess.check_call(build_args)
File "/home/anaconda/envs/paddle/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', '.', '--', '-j', '1']' returned non-zero exit status 2.