【模型推理】ubuntu 配置和使用 openvino

1、clone openvino

git clone --recursive https://gitee.com/openvinotoolkit-prc/openvino.git

   若在 clone 一些三方依赖外链时超时,可单独转 gitee 进行 clone 。

2、编译

   安装依赖:

chmod +x install_build_dependencies.sh 

./install_build_dependencies.sh

   编译:

mkdir build 
cd build 

cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CLDNN=OFF .. 

make -j32 
make install -j32

3、安装 python 接口

cd inference-engine/ie_bridges/python/src 

pip install -i https://pypi.douban.com/simple -r requirements-dev.txt

   然后回到第2步,添加编译选项 -DENABLE_PYTHON=ON,进行重新编译。若要指定具体的 python 版本:

-DPYTHON_EXECUTABLE=`which python3.7` \ 
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so \ 
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7

cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CLDNN=O

猜你喜欢

转载自blog.csdn.net/Mrrunsen/article/details/120753383