Update cpu.md

This commit is contained in:
Jason
2022-12-09 14:28:00 +08:00
committed by GitHub
parent 3c05c74513
commit b19fe6a965

View File

@@ -27,6 +27,11 @@ Linux上编译需满足
- gcc/g++ >= 5.4(推荐8.2)
- cmake >= 3.18.0
此外更推荐开发者自行安装,编译时通过`-DOPENCV_DIRECTORY`来指定环境中的OpenCV如若不指定-DOPENCV_DIRECTORY会自动下载FastDeploy提供的预编译的OpenCV但在**Linux平台**无法支持Video的读取以及imshow等可视化界面功能
```
sudo apt-get install libopencv-dev
```
```bash
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
@@ -36,6 +41,7 @@ cmake .. -DENABLE_ORT_BACKEND=ON \
-DENABLE_OPENVINO_BACKEND=ON \
-DCMAKE_INSTALL_PREFIX=${PWD}/compiled_fastdeploy_sdk \
-DENABLE_VISION=ON \
-DOPENCV_DIRECTORY=/usr/lib/x86_64-linux-gnu/cmake/opencv4 \
-DENABLE_TEXT=ON
make -j12
make install
@@ -90,6 +96,8 @@ export ENABLE_PADDLE_BACKEND=ON
export ENABLE_OPENVINO_BACKEND=ON
export ENABLE_VISION=ON
export ENABLE_TEXT=ON
# OPENCV_DIRECTORY可选不指定会自动下载FastDeploy提供的预编译OpenCV库
export OPENCV_DIRECTORY=/usr/lib/x86_64-linux-gnu/cmake/opencv4
python setup.py build
python setup.py bdist_wheel