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目录中生成。