From fb68c80420a01ea7e8670d6254a6169736c37766 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 19 Nov 2020 15:15:13 -0800 Subject: [PATCH] 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. --- .github/actions/install-openvino/.gitignore | 2 ++ .github/actions/install-openvino/action.yml | 1 - .github/actions/install-openvino/install.sh | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .github/actions/install-openvino/.gitignore diff --git a/.github/actions/install-openvino/.gitignore b/.github/actions/install-openvino/.gitignore new file mode 100644 index 0000000000..ae775fc25a --- /dev/null +++ b/.github/actions/install-openvino/.gitignore @@ -0,0 +1,2 @@ +CHECKSUM +GPG-PUB-KEY* diff --git a/.github/actions/install-openvino/action.yml b/.github/actions/install-openvino/action.yml index e4858c2d29..f80b841494 100644 --- a/.github/actions/install-openvino/action.yml +++ b/.github/actions/install-openvino/action.yml @@ -5,7 +5,6 @@ inputs: version: description: 'The release version of OpenVINO to install' required: false - default: '2020.4.287' runs: using: composite diff --git a/.github/actions/install-openvino/install.sh b/.github/actions/install-openvino/install.sh index 16e5233854..905d4678d6 100755 --- a/.github/actions/install-openvino/install.sh +++ b/.github/actions/install-openvino/install.sh @@ -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