Open7

OpenVINOのmasterブランチのソースコードビルドとインストール 2022年01月05日時点版

PINTOPINTO
git clone https://github.com/openvinotoolkit/openvino && cd openvino
git checkout e89db1c6de8eb551949330114d476a2a4be499ed
git submodule update --init --recursive
docker run --rm -it -v `pwd`:/buildwork ubuntu:20.04
PINTOPINTO
cd /buildwork
export DEBIAN_FRONTEND=noninteractive

apt update && \
apt install -y --no-install-recommends \
cmake \
make \
python3-dev \
python3-pip \
patchelf \
git \
tzdata \
sudo

pip install pip --upgrade
pip install Cython numpy setuptools wheel --upgrade
ln -s /usr/bin/python3 /usr/bin/python

chmod +x scripts/submodule_update_with_gitee.sh
./scripts/submodule_update_with_gitee.sh

chmod +x install_build_dependencies.sh
./install_build_dependencies.sh

mkdir build && cd build

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_PYTHON=ON \
-DPYTHON_EXECUTABLE=`which python3` \
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.8 \
-DENABLE_CLDNN=ON \
-DENABLE_WHEEL=ON ..

make -j$(nproc)
cp wheels/*.whl ..
exit
PINTOPINTO
sudo find / -name "mo.py"

/usr/local/lib/python3.8/dist-packages/openvino/tools/mo/mo.py
/opt/intel/openvino_2021.4.582/deployment_tools/model_optimizer/mo.py