Skip to content
Xiake Sun edited this page Aug 16, 2022 · 1 revision

1. Setup system dependency and environment

1.1. Setup GCC 8.3.1

sudo yum update && sudo yum install gcc centos-release-scl git
sudo yum install devtoolset-8
source /opt/rh/devtoolset-8/enable
gcc -v

1.2. Setup CMake 3.18.4

wget https://cmake.org/files/v3.18/cmake-3.18.4-Linux-x86_64.tar.gz
tar -xvf cmake-3.18.4-Linux-x86_64.tar.gz
export PATH=$PWD/cmake-3.18.4-Linux-x86_64/bin:$PATH
cmake –version

1.3. Setup python virtual environment

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sudo chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
conda create -n ov_py36 python=3.6 -y
conda activate ov_py36
pip install -U pip wheel setuptools cython patchelf
python -v

2. Build OpenVINO with CMake 3.18.4 and GCC 8.3.1

git clone https://github.com/openvinotoolkit/openvino -b 2022.1.0
cd openvino & git submodule update --init --recursive
mkdir build && mkdir install
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DCMAKE_INSTALL_PREFIX=../install -DENABLE_SYSTEM_TBB=OFF -DENABLE_OPENCV=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_INTEL_MYRIAD_COMMON=OFF -DTREAT_WARNING_AS_ERROR=OFF -DPYTHON_EXECUTABLE=`which python3.6` -DPYTHON_LIBRARY=~/miniconda3/envs/ov_py36/lib/libpython3.6m.so -DPYTHON_INCLUDE_DIR=~/miniconda3/envs/ov_py36/include/python3.6m  ..
make --jobs=$(nproc --all)
make install

3. Install and evaluate with OpenVINO python wheel

pip install ../install/tools/openvino*.whl
mkdir ~/ov_models
pip install onnx==1.11.0 protobuf== 3.19.4 openvino-dev[pytorch]
omz_downloader --name resnet-50-pytorch -o ~/ov_models/
omz_converter --name resnet-50-pytorch -o ~/ov_models/ -d ~/ov_models/
benchmark_app -m ~/ov_models/public/resnet-50-pytorch/FP32/resnet-50-pytorch.xml -d CPU
Clone this wiki locally