Yes sure.
cell:
print("This will take a while...")
!wget -O openvino_key https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021?elq_cid=6770273_ts1607381885691&erpm_id=9830841_ts1607381885691&elq_cid=6770273_ts1607381960247&erpm_id=9830841_ts1607381960247
!apt-key add openvino_key
#!apt-key -q list
!echo "deb https://apt.repos.intel.com/openvino/2021 all main" | tee /etc/apt/sources.list.d/intel-openvino-2021.list
!apt update -q
!apt-cache search intel-openvino-dev-ubuntu18
!apt-get install intel-openvino-dev-ubuntu18-2021.2.200 -y -q
!pip install -U --no-deps --quiet openvino
**
#unknown bug - this is just a patch!cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/lib/libtbb.so /usr/lib/x86_64-linux-gnu/libtbb.so!cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/lib/libtbb.so.2 /usr/lib/x86_64-linux-gnu/libtbb.so.2!ldconfigprint("Installation Completed...")#%env we can set environmental variable with this
#Run the validation!ls /opt/intel/#Run the Validation Demo code.demo_cmd = "/opt/intel/openvino_2021/deployment_tools/demo/demo_squeezenet_download_convert_run.sh"**
import os
import subprocess
import shutil
output = subprocess.check_output(demo_cmd, shell=True)
print (output.decode('utf-8'))
error:
/usr/local/lib/python3.10/dist-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
and should_run_async(code)
$$
This will take a while...
--2023-05-02 14:56:26-- https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021?elq_cid=6770273_ts1607381885691
Resolving apt.repos.intel.com (apt.repos.intel.com)... 23.7.125.34, 2600:1407:3c00:1493::4b23, 2600:1407:3c00:148c::4b23
Connecting to apt.repos.intel.com (apt.repos.intel.com)|23.7.125.34|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 939 [binary/octet-stream]
Saving to: ‘openvino_key’
openvino_key 100%[===================>] 939 --.-KB/s in 0s
2023-05-02 14:56:26 (78.1 MB/s) - ‘openvino_key’ saved [939/939]
OK
deb https://apt.repos.intel.com/openvino/2021 all main
Hit:1 https://apt.repos.intel.com/openvino/2021 all InRelease
Hit:2 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease
Hit:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Hit:9 http://ppa.launchpad.net/cran/libgit2/ubuntu focal InRelease
Hit:10 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:11 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
Hit:12 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal InRelease
Fetched 222 kB in 2s (124 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
27 packages can be upgraded. Run 'apt list --upgradable' to see them.
intel-openvino-dev-ubuntu18-2021.1.110 - Intel® Deep Learning Deployment Toolkit 2021.1 for Linux*
intel-openvino-dev-ubuntu18-2021.2.200 - Intel® Deep Learning Deployment Toolkit 2021.2 for Linux*
intel-openvino-dev-ubuntu18-2021.3.394 - Intel® Deep Learning Deployment Toolkit 2021.3 for Linux*
intel-openvino-dev-ubuntu18-2021.4.582 - Intel® Deep Learning Deployment Toolkit 2021.4 for Linux*
intel-openvino-dev-ubuntu18-2021.4.689 - Intel® Deep Learning Deployment Toolkit 2021.4.1 for Linux*
intel-openvino-dev-ubuntu18-2021.4.752 - Intel® Deep Learning Deployment Toolkit 2021.4.1 for Linux*
intel-openvino-dev-ubuntu20-2021.1.110 - Intel® Deep Learning Deployment Toolkit 2021.1 for Linux*
intel-openvino-dev-ubuntu20-2021.2.200 - Intel® Deep Learning Deployment Toolkit 2021.2 for Linux*
intel-openvino-dev-ubuntu20-2021.3.394 - Intel® Deep Learning Deployment Toolkit 2021.3 for Linux*
intel-openvino-dev-ubuntu20-2021.4.582 - Intel® Deep Learning Deployment Toolkit 2021.4 for Linux*
intel-openvino-dev-ubuntu20-2021.4.689 - Intel® Deep Learning Deployment Toolkit 2021.4.1 for Linux*
intel-openvino-dev-ubuntu20-2021.4.752 - Intel® Deep Learning Deployment Toolkit 2021.4.1 for Linux*
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package intel-openvino-dev-2021.2.200
E: Couldn't find any package by glob 'intel-openvino-dev-2021.2.200'
E: Couldn't find any package by regex 'intel-openvino-dev-2021.2.200'
Installation Completed...
openvino_2021 openvino_2021.2.200
$$
$$
$$
$$
CalledProcessError Traceback (most recent call last)
$$
$$
<ipython-input-45-b6a7a75882f8> in <cell line: 25>()
23 import subprocess
24 import shutil
---> 25 output = subprocess.check_output(demo_cmd, shell=True)
26 print (output.decode('utf-8'))
/usr/lib/python3.10/subprocess.py in check_output(timeout, popenargs, **kwargs)
419 kwargs['input'] = empty
420
--> 421 return run(popenargs, stdout=PIPE, timeout=timeout, check=True,
422 **kwargs).stdout
423
/usr/lib/python3.10/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
524 retcode = process.poll()
525 if check and retcode:
--> 526 raise CalledProcessError(retcode, process.args,
527 output=stdout, stderr=stderr)
528 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '/opt/intel/openvino_2021/deployment_tools/demo/demo_squeezenet_download_convert_run.sh' returned non-zero exit status 1.
$$