在Jetson Nano上编译FastDeploy

1. C++库的编译

git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
sudo cmake -D CMAKE_CUDA_COMPILER="/usr/local/cuda/bin/nvcc" ..
sudo cmake .. -DBUILD_ON_JETSON=ON \
         -DENABLE_VISION=ON \
         -DCMAKE_INSTALL_PREFIX=${
    
    PWD}/installed_fastdeploy
sudo make -j8
make install

编译完成后,在CMAKE_INSTALL_PREFIX指定的目录下(上述编译脚本对应的路径为FastDeploy/build/installed_fastdeploy)会生成FastDeploy对应的C++推理库,如下图所示:
在这里插入图片描述

2. Python库的编译

git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/python
export BUILD_ON_JETSON=ON
export ENABLE_VISION=ON
python3 setup.py build
python3 setup.py bdist_wheel

编译后的whl文件将会在FastDeploy/python/dist目录中生成。

猜你喜欢

转载自blog.csdn.net/qianbin3200896/article/details/127939073