Ubuntu18.04下apt命令安装和卸载OpenVINO

一、安装

1.为存储库安装GPG密钥

(1)下载公钥GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB:

https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB

(2)将此秘钥保存到系统秘钥,返回OK

cd ~/Downloads

sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB

(3)刷新apt列表:

sudo apt-key list

2.添加apt存储库:

(1)创建一个新的源列表文件

cd /etc/apt/sources.list.d

sudo vim  intel-openvino-2019.list

(2)添加下面代码:

deb https://apt.repos.intel.com/openvino/2019/ all main

3.更新软件包列表:

(1)运行update命令

sudo apt update

(2)查看所有可用的OpenVINO软件包和组件的列表:

sudo apt-cache search openvino

Ubuntu18.04下apt命令安装和卸载OpenVINO_第1张图片

4.使用apt软件包管理器安装openvino,这里安装的是Developer 18.04版本,也就是开发版。

Runtime Packages

On Ubuntu 18.04:

sudo apt install intel-openvino-runtime-ubuntu18

On Ubuntu 16.04:

sudo apt install intel-openvino-runtime-ubuntu16

Developer Packages

On Ubuntu 18.04:

sudo apt install intel-openvino-dev-ubuntu18

On Ubuntu 16.04:

sudo apt install intel-openvino-dev-ubuntu16

遇到问题:

Ubuntu18.04下apt命令安装和卸载OpenVINO_第2张图片

这选择下载最新的R3版本:

sudo apt install intel-openvino-runtime-ubuntu18-2019.3.344

等待执完成后在对应路径查看,openvino下载包已存在

5.安装依赖环境:

cd /opt/intel/openvino_2019.2.242/install_dependencies

sudo -E ./install_openvino_dependencies.sh

设置临时环境变量(关闭shell终端就会删除环境变量,建议设置永久)

source /opt/intel/openvino/bin/setupvars.sh

设置永久环境变量:

vim /.bashrc

添加下列代码:

source /opt/intel/openvino/bin/setupvars.sh

配置模型优化器,同时配置所有的框架:

cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites

sudo ./install_prerequisites.sh

6.验证

运行图像分类验证脚本:

cd /opt/intel/openvino/deployment_tools/demo

sudo  -H  ./demo_squeezenet_download_convert_run.sh

运行推理管道验证脚本:

sudo -E -H  ./demo_security_barrier_camera.sh

二、卸载

执行命令后,查看/opt/intel文件夹下已无文件:

sudo apt autoremove intel-openvino-runtime-ubuntu18-2019.3.344

然后再删除用户目录的inference_engine_demos_build、openvino_models等相关文件夹就可以了

你可能感兴趣的:(深度学习)