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:
Pat Hickey
2020-11-19 15:15:13 -08:00
parent f9de1d3e5c
commit fb68c80420
3 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
CHECKSUM
GPG-PUB-KEY*

View File

@@ -5,7 +5,6 @@ inputs:
version:
description: 'The release version of OpenVINO to install'
required: false
default: '2020.4.287'
runs:
using: composite

View File

@@ -2,15 +2,23 @@
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.
wget https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020
echo '5f5cff8a2d26ba7de91942bd0540fa4d GPG-PUB-KEY-INTEL-OPENVINO-2020' > CHECKSUM
md5sum --check CHECKSUM
curl -sSL https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020 > $scriptdir/GPG-PUB-KEY-INEL-OPENVINO-2020
echo "5f5cff8a2d26ba7de91942bd0540fa4d $scriptdir/GPG-PUB-KEY-INTEL-OPENVINO-2020" > $scriptdir/CHECKSUM
md5sum --check $scriptdir/CHECKSUM
# 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
sudo apt update
# Install OpenVINO package.
sudo apt install -y intel-openvino-runtime-ubuntu18-$1
sudo apt install -y intel-openvino-runtime-ubuntu18-$version