之前基于源码安装的环境在开发中编译总是缺包,所以尝试使用Apt安装。

参数官方文档


配置 Apt

$ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
$ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB

$ echo "deb https://apt.repos.intel.com/openvino/2022 bionic main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2022.list

$ sudo apt update
// apt-cache search openvino


安装 Runtime

// To Install the Latest Version
$ sudo apt install openvino
$ apt list --installed | grep openvino

$ sudo apt install openvino-opencv

// $ ll /opt/intel/


安装 Dev

$ sudo apt-get install python3-venv
$ python3 -m venv openvino_env

$ source openvino_env/bin/activate

$ python -m pip install --upgrade pip
$ pip install openvino-dev[onnx]

$ mo -h
usage: main.py [options]

optional arguments:
  -h, --help            show this help message and exit
  --framework {onnx,kaldi,paddle,mxnet,tf,caffe}
                        Name of the framework used to train the input model.
...
...


GPU驱动安装

$ cd /opt/intel/openvino_2022/install_dependencies/
$ sudo -E ./install_NEO_OCL_driver.sh


环境

$ source /opt/intel/openvino_2022/setupvars.sh

编译测试

$ cd /opt/intel/openvino_2022/samples/cpp
$ ./build_samples.sh