install-openvino: make it easier to invoke on your local machine
put the default version in the shell script, not the yml. write any files to the directory where the action lives, and .gitignore them.
This commit is contained in:
2
.github/actions/install-openvino/.gitignore
vendored
Normal file
2
.github/actions/install-openvino/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CHECKSUM
|
||||||
|
GPG-PUB-KEY*
|
||||||
1
.github/actions/install-openvino/action.yml
vendored
1
.github/actions/install-openvino/action.yml
vendored
@@ -5,7 +5,6 @@ inputs:
|
|||||||
version:
|
version:
|
||||||
description: 'The release version of OpenVINO to install'
|
description: 'The release version of OpenVINO to install'
|
||||||
required: false
|
required: false
|
||||||
default: '2020.4.287'
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|||||||
18
.github/actions/install-openvino/install.sh
vendored
18
.github/actions/install-openvino/install.sh
vendored
@@ -2,15 +2,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
version="2020.4.287"
|
||||||
|
else
|
||||||
|
version="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
# Retrieve OpenVINO checksum.
|
# Retrieve OpenVINO checksum.
|
||||||
wget https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020
|
curl -sSL https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020 > $scriptdir/GPG-PUB-KEY-INEL-OPENVINO-2020
|
||||||
echo '5f5cff8a2d26ba7de91942bd0540fa4d GPG-PUB-KEY-INTEL-OPENVINO-2020' > CHECKSUM
|
echo "5f5cff8a2d26ba7de91942bd0540fa4d $scriptdir/GPG-PUB-KEY-INTEL-OPENVINO-2020" > $scriptdir/CHECKSUM
|
||||||
md5sum --check CHECKSUM
|
md5sum --check $scriptdir/CHECKSUM
|
||||||
|
|
||||||
# Add OpenVINO repository (deb).
|
# Add OpenVINO repository (deb).
|
||||||
sudo apt-key add GPG-PUB-KEY-INTEL-OPENVINO-2020
|
sudo apt-key add $scriptdir/GPG-PUB-KEY-INTEL-OPENVINO-2020
|
||||||
echo "deb https://apt.repos.intel.com/openvino/2020 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2020.list
|
echo "deb https://apt.repos.intel.com/openvino/2020 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2020.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
||||||
# Install OpenVINO package.
|
# Install OpenVINO package.
|
||||||
sudo apt install -y intel-openvino-runtime-ubuntu18-$1
|
sudo apt install -y intel-openvino-runtime-ubuntu18-$version
|
||||||
|
|||||||
Reference in New Issue
Block a user