mirror of
https://github.com/stornic56/openvino-runtime-simple-installer.git
synced 2026-10-31 13:08:06 +00:00
refactor: deps desde el tarball oficial (flujo doc oficial)
- Nuevo modo --extract en openvino_logic.sh: extrae el tarball con el trap de limpieza de extraccion parcial (O6 reubicado aqui) - --install queda en politica replace + mv + symlink (la extraccion ya sucedio en --extract) - main.sh reordena: download -> extract -> deps (del tarball, con validacion temprana del path install_dependencies/) -> install - deps/ eliminado (357 lineas de fork): upstream incluye debian13+ubuntu26 nativamente; el script del tarball va siempre version-matched
This commit is contained in:
+28
-8
@@ -6,10 +6,33 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/common.sh"
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
print_error "Usage: $0 <URL> <OUTPUT_FILE> | $0 --install <FILE>"
|
||||
print_error "Usage: $0 <URL> <OUTPUT_FILE> | $0 --extract <FILE> | $0 --install <FILE>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "--extract" ]; then
|
||||
FILENAME="$2"
|
||||
if [ ! -f "$FILENAME" ]; then
|
||||
print_error " $FILENAME could not be found to extract."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Known before tar (enables partial-extraction cleanup on abort)
|
||||
DIRNAME="${FILENAME%.tgz}"
|
||||
trap 'rm -rf "$DIRNAME"' EXIT
|
||||
|
||||
print_substep "Unzipping $FILENAME..."
|
||||
tar -xf "$FILENAME"
|
||||
|
||||
# fallback if the extracted folder name differs from the tarball name
|
||||
if [ ! -d "$DIRNAME" ]; then
|
||||
TAR_LIST=$(tar -tf "$FILENAME")
|
||||
DIRNAME="${TAR_LIST%%$'\n'*}" # first entry (no pipe, no SIGPIPE)
|
||||
DIRNAME="${DIRNAME%%/*}"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "--install" ]; then
|
||||
FILENAME="$2"
|
||||
if [ ! -f "$FILENAME" ]; then
|
||||
@@ -30,9 +53,9 @@ if [ "$1" = "--install" ]; then
|
||||
INSTALL_DIR="/opt/intel/openvino_$(echo "$VERSION_FULL" | cut -d. -f1-3)"
|
||||
|
||||
# Replace policy (updates): remove ANY previous 2026 install and the previous symlink.
|
||||
# Known limitation: the previous install is deleted BEFORE extracting; if the tar
|
||||
# failed afterwards, the system would be left without OpenVINO. Acceptable because
|
||||
# the SHA256 was already verified during the download step.
|
||||
# Known limitation: the previous install is deleted BEFORE moving the new one; if the
|
||||
# mv failed afterwards, the system would be left without OpenVINO. Acceptable because
|
||||
# the extraction and its SHA256 verification already succeeded in the --extract step.
|
||||
if ls -d /opt/intel/openvino_2026.* >/dev/null 2>&1; then
|
||||
print_warning "An existing OpenVINO installation was found. Replacing it..."
|
||||
fi
|
||||
@@ -40,10 +63,7 @@ if [ "$1" = "--install" ]; then
|
||||
rm -rf /opt/intel/openvino_2026.* # ANY previous 2026 install
|
||||
mkdir -p /opt/intel
|
||||
|
||||
DIRNAME="${FILENAME%.tgz}" # known before tar (enables trap cleanup)
|
||||
trap 'rm -rf "$DIRNAME"' EXIT
|
||||
print_substep "Unzipping $FILENAME..."
|
||||
tar -xf "$FILENAME"
|
||||
DIRNAME="${FILENAME%.tgz}"
|
||||
|
||||
if [ ! -d "$DIRNAME" ]; then
|
||||
# guess the real name
|
||||
|
||||
-357
@@ -1,357 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2018-2026 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Modified by stornic56 (2026) to add support for Debian 13 (Trixie), Ubuntu 26.04,
|
||||
# and Python 3.13 dependencies. Also ensures dnf is used on Fedora.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
#===================================================================================================
|
||||
# Option parsing
|
||||
|
||||
all_comp=(core dev gpu python)
|
||||
os=${os:-auto}
|
||||
|
||||
# public options
|
||||
interactive=yes
|
||||
dry=
|
||||
extra=
|
||||
print=
|
||||
comp=()
|
||||
|
||||
# private options
|
||||
keepcache=
|
||||
selftest=
|
||||
|
||||
while :; do
|
||||
case "${1:-}" in
|
||||
-h | -\? | --help)
|
||||
echo "Options:"
|
||||
echo " -y non-interactive run (off)"
|
||||
echo " -n dry-run, assume no (off)"
|
||||
echo " -c=<name> install component <name>, can be repeated (${all_comp[*]})"
|
||||
echo " -e add extra repositories (RHEL 7, 8, 9) (off)"
|
||||
echo " -p print package list and exit (off)"
|
||||
exit
|
||||
;;
|
||||
-y) interactive= ;;
|
||||
-n) dry=yes ;;
|
||||
-c=?*) comp+=("${1#*=}") ;;
|
||||
-e) extra=yes ;;
|
||||
-p) print=yes ;;
|
||||
--selftest) selftest=yes ;;
|
||||
--keepcache) keepcache=yes ;;
|
||||
*) break ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# No components selected - install default
|
||||
if [ ${#comp[@]} -eq 0 ]; then
|
||||
comp=("${all_comp[@]}")
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# Selftest
|
||||
|
||||
if [ -n "$selftest" ]; then
|
||||
for image in centos:7 centos:8 rhel:8 rhel:9.1 \
|
||||
almalinux:8.7 amazonlinux:2 \
|
||||
fedora:34 fedora:35 fedora:36 fedora:37 fedora:38 \
|
||||
opensuse/leap:15.3 \
|
||||
raspbian:9 debian:9 ubuntu:18.04 \
|
||||
raspbian:10 debian:10 ubuntu:20.04 ubuntu:20.10 ubuntu:21.04 \
|
||||
raspbian:11 debian:11 ubuntu:21.10 ubuntu:22.04 \
|
||||
raspbian:12 debian:12 debian:13 ubuntu:22.10 ubuntu:23.04 ubuntu:24.04; do
|
||||
for opt in "-h" "-p" "-e -p" "-n" "-n -e" "-y" "-y -e"; do
|
||||
echo "||"
|
||||
echo "|| Test $image / '$opt'"
|
||||
echo "||"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$(realpath "${BASH_SOURCE:-$0}")")" >/dev/null 2>&1 && pwd)"
|
||||
docker run -it --rm \
|
||||
--volume "${SCRIPT_DIR}":/scripts:ro,Z \
|
||||
--volume yum-cache:/var/cache/yum \
|
||||
--volume apt-cache:/var/cache/apt/archives \
|
||||
-e DEBIAN_FRONTEND=noninteractive \
|
||||
$image \
|
||||
bash "/scripts/${0##*/}" "$opt" --keepcache
|
||||
echo "||"
|
||||
echo "|| Completed: $image / '$opt'"
|
||||
echo "||"
|
||||
done
|
||||
done
|
||||
|
||||
for opt in "-h" "-p" "-e -p" "-n" "-n -e" "-y" "-y -e"; do
|
||||
echo "||"
|
||||
echo "|| Test ubuntu:26.04 / '$opt'"
|
||||
echo "||"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$(realpath "${BASH_SOURCE:-$0}")")" >/dev/null 2>&1 && pwd)"
|
||||
docker run -it --rm \
|
||||
--volume "${SCRIPT_DIR}":/scripts:ro,Z \
|
||||
--volume yum-cache:/var/cache/yum \
|
||||
--volume apt-cache:/var/cache/apt/archives \
|
||||
-e DEBIAN_FRONTEND=noninteractive \
|
||||
ubuntu:26.04 \
|
||||
bash "/scripts/${0##*/}" "$opt" --keepcache 2>/dev/null || true
|
||||
echo "||"
|
||||
echo "|| Completed: ubuntu:26.04 / '$opt'"
|
||||
echo "||"
|
||||
done
|
||||
|
||||
echo "Self test finished, to remove temporary docker volumes run:"
|
||||
echo "'docker volume rm yum-cache apt-cache'"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# OS detection
|
||||
|
||||
if [ "$os" == "auto" ]; then
|
||||
os=""
|
||||
if [ -f /etc/os-release ]; then
|
||||
os=$(
|
||||
. /etc/os-release
|
||||
echo "${ID:-}${VERSION_ID:-}"
|
||||
)
|
||||
fi
|
||||
if [[ "$os" =~ "rhel8".* ]]; then
|
||||
os="rhel8"
|
||||
fi
|
||||
case $os in
|
||||
centos7 | centos8 | centos9 | \
|
||||
rhel8 | rhel9.1 | rhel9.2 | rhel9.3 | rhel9.4 | \
|
||||
opencloudos8.5 | opencloudos8.6 | opencloudos8.8 | opencloudos9.0 | opencloudos9.2 | \
|
||||
tencentos3.1 | tencentos3.2 | tencentos3.3 | tencentos4.0 | tencentos4.2 | \
|
||||
anolis8.6 | anolis8.8 | \
|
||||
openEuler20.03 | openEuler22.03 | openEuler23.03 | openEuler24.03 | \
|
||||
almalinux8.7 | almalinux8.8 | almalinux9.2 | almalinux9.3 | almalinux9.4 | \
|
||||
amzn2 | amzn2022 | amzn2023 | \
|
||||
ol8.7 | ol8.8 | ol9.2 | ol9.3 | ol9.4 | \
|
||||
rocky8.7 | rocky8.8 | rocky9.2 | rocky9.3 | rocky9.4 | \
|
||||
fedora29 | fedora30 | fedora31 | fedora32 | fedora33 | fedora34 | fedora35 | fedora36 | \
|
||||
fedora37 | fedora38 | fedora39 | fedora40 | fedora41 | \
|
||||
fedora42 | fedora43 | fedora44 | fedora* | \
|
||||
opensuse-leap15.3 | \
|
||||
raspbian9 | debian9 | ubuntu18.04 | \
|
||||
raspbian10 | debian10 | ubuntu20.04 | ubuntu20.10 | ubuntu21.04 | \
|
||||
raspbian11 | debian11 | ubuntu21.10 | ubuntu22.04 | \
|
||||
raspbian12 | debian12 | debian13 | ubuntu22.10 | ubuntu23.04 | ubuntu23.10 | ubuntu24.04 | ubuntu26.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;;
|
||||
*)
|
||||
echo "Unsupported OS: ${os:-detection failed}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# Collect packages
|
||||
|
||||
extra_repos=()
|
||||
|
||||
if [ "$os" == "raspbian9" ] || [ "$os" == "debian9" ]; then
|
||||
pkgs_gpu=(ocl-icd-libopencl1)
|
||||
pkgs_python=()
|
||||
pkgs_dev=(pkg-config g++ gcc libc6-dev make sudo)
|
||||
|
||||
elif [ "$os" == "ubuntu18.04" ]; then
|
||||
pkgs_gpu=(ocl-icd-libopencl1)
|
||||
pkgs_python=(python3.8 libpython3.8 python3.8-venv python3-pip)
|
||||
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo)
|
||||
|
||||
elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbian10" ] ||
|
||||
[ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] || [ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] ||
|
||||
[ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "ubuntu24.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] ||
|
||||
[ "$os" == "debian13" ] || [ "$os" == "ubuntu26.04" ]; then
|
||||
|
||||
pkgs_gpu=(ocl-icd-libopencl1)
|
||||
pkgs_python=(python3 python3-venv python3-pip)
|
||||
pkgs_dev=(cmake pkgconf g++ gcc libc6-dev make sudo)
|
||||
|
||||
if [ "$os" == "debian10" ] || [ "$os" == "raspbian10" ]; then
|
||||
pkgs_python+=(libpython3.7)
|
||||
elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "ubuntu20.10" ] || [ "$os" == "ubuntu21.04" ]; then
|
||||
pkgs_python+=(libpython3.8)
|
||||
elif [ "$os" == "ubuntu21.10" ] ||
|
||||
[ "$os" == "debian11" ] || [ "$os" == "raspbian11" ]; then
|
||||
pkgs_python+=(libpython3.9)
|
||||
elif [ "$os" == "ubuntu22.04" ] || [ "$os" == "ubuntu22.10" ] ||
|
||||
[ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then
|
||||
pkgs_python+=(libpython3.10)
|
||||
elif [ "$os" == "ubuntu23.04" ]; then
|
||||
pkgs_python+=(libpython3.11)
|
||||
elif [ "$os" == "ubuntu24.04" ]; then
|
||||
pkgs_python+=(libpython3.12)
|
||||
elif [ "$os" == "debian13" ]; then
|
||||
pkgs_python+=(libpython3.13)
|
||||
elif [ "$os" == "ubuntu25.04" ] || [ "$os" == "ubuntu26.04" ]; then
|
||||
pkgs_python+=(libpython3.14)
|
||||
fi
|
||||
|
||||
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
|
||||
[ "$os" == "rhel8" ] ||
|
||||
[ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ] ||
|
||||
[ "$os" == "opencloudos8.5" ] || [ "$os" == "opencloudos8.6" ] || [ "$os" == "opencloudos8.8" ] ||
|
||||
[ "$os" == "opencloudos9.0" ] || [ "$os" == "opencloudos9.2" ] ||
|
||||
[ "$os" == "tencentos3.1" ] || [ "$os" == "tencentos3.2" ] || [ "$os" == "tencentos3.3" ] ||
|
||||
[ "$os" == "tencentos4.0" ] || [ "$os" == "tencentos4.2" ] ||
|
||||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
|
||||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ] ||
|
||||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
|
||||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
|
||||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
|
||||
[ "$os" == "fedora41" ] || [ "$os" == "fedora42" ] || [ "$os" == "fedora43" ] || [ "$os" == "fedora44" ] || [[ "$os" == fedora* ]] ||
|
||||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
|
||||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ] ||
|
||||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
|
||||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
|
||||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
|
||||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ] ||
|
||||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ]; then
|
||||
|
||||
arch=$(uname -m)
|
||||
|
||||
if [ "$os" == "amzn2" ]; then
|
||||
amazon-linux-extras install epel python3.8
|
||||
fi
|
||||
|
||||
pkgs_gpu=()
|
||||
pkgs_python=()
|
||||
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake3 sudo)
|
||||
|
||||
if [ "$os" == "centos7" ] || [ "$os" == "amzn2" ]; then
|
||||
pkgs_dev+=(pkgconfig)
|
||||
else
|
||||
pkgs_dev+=(pkgconf-pkg-config)
|
||||
fi
|
||||
|
||||
if [ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
|
||||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
|
||||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
|
||||
[ "$os" == "fedora41" ] || [ "$os" == "fedora42" ] || [ "$os" == "fedora43" ] || [ "$os" == "fedora44" ] || [[ "$os" == fedora* ]] ||
|
||||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
|
||||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ] ||
|
||||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
|
||||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
|
||||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
|
||||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ] ||
|
||||
[ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
|
||||
[ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ||
|
||||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
|
||||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ]; then
|
||||
pkgs_python+=(python3 python3-pip)
|
||||
fi
|
||||
|
||||
if [ "$os" == "centos7" ] || [ "$os" == "amzn2" ]; then
|
||||
pkgs_gpu+=("ocl-icd.$arch")
|
||||
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm")
|
||||
elif [ "$os" == "rhel8" ]; then
|
||||
pkgs_gpu+=("http://vault.centos.org/centos/8-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.12-1.el8.$arch.rpm")
|
||||
pkgs_python+=(python38 python38-pip)
|
||||
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm")
|
||||
elif [ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ]; then
|
||||
pkgs_gpu+=("https://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.13-4.el9.$arch.rpm")
|
||||
pkgs_python+=(python3 python3-pip)
|
||||
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm")
|
||||
fi
|
||||
elif [ "$os" == "opensuse-leap15.3" ]; then
|
||||
pkgs_gpu=(libOpenCL1)
|
||||
pkgs_python=(python39-base python39 python39-venv python39-pip)
|
||||
pkgs_dev=(cmake pkg-config gcc-c++ gcc make sudo)
|
||||
else
|
||||
echo "Internal script error: invalid OS (${os}) after check (package selection)" >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# Gather packages and print list
|
||||
|
||||
pkgs=()
|
||||
for comp in "${comp[@]}"; do
|
||||
var="pkgs_${comp}[@]"
|
||||
pkgs+=("${!var}")
|
||||
done
|
||||
|
||||
if [ ${#pkgs[@]} -eq 0 ]; then
|
||||
if [ -n "$print" ]; then
|
||||
echo "No packages to install" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "No packages to install"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$print" ]; then
|
||||
echo "${pkgs[*]}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# Actual installation
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
echo "ERROR: this script must be run as root to install 3rd party packages." >&2
|
||||
echo "Please try again with \"sudo -E $0\", or as root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
iopt=
|
||||
|
||||
if [ "$os" == "debian9" ] || [ "$os" == "raspbian9" ] || [ "$os" == "ubuntu18.04" ] ||
|
||||
[ "$os" == "debian10" ] || [ "$os" == "raspbian10" ] || [ "$os" == "ubuntu20.04" ] || [ "$os" == "ubuntu20.10" ] || [ "$os" == "ubuntu21.04" ] ||
|
||||
[ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] || [ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] ||
|
||||
[ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] || [ "$os" == "debian13" ] || [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "ubuntu23.10" ] || [ "$os" == "ubuntu24.04" ] || [ "$os" == "ubuntu26.04" ]; then
|
||||
|
||||
[ -z "$interactive" ] && iopt="-y"
|
||||
[ -n "$dry" ] && iopt="--dry-run"
|
||||
[ -n "$keepcache" ] && rm -f /etc/apt/apt.conf.d/docker-clean
|
||||
|
||||
apt-get update && apt-get install --no-install-recommends "$iopt" "${pkgs[@]}"
|
||||
|
||||
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
|
||||
[ "$os" == "rhel8" ] ||
|
||||
[ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ] ||
|
||||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
|
||||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ] ||
|
||||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
|
||||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
|
||||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
|
||||
[ "$os" == "fedora41" ] || [ "$os" == "fedora42" ] || [ "$os" == "fedora43" ] || [ "$os" == "fedora44" ] || [[ "$os" == fedora* ]] ||
|
||||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
|
||||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ] ||
|
||||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
|
||||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
|
||||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
|
||||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ] ||
|
||||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ]; then
|
||||
|
||||
# Usar dnf en Fedora moderna, yum en el resto
|
||||
if [[ "$os" == fedora* ]]; then
|
||||
PKGCMD="dnf"
|
||||
else
|
||||
PKGCMD="yum"
|
||||
fi
|
||||
|
||||
[ -z "$interactive" ] && iopt="--assumeyes"
|
||||
[ -n "$dry" ] && iopt="--downloadonly"
|
||||
[ -n "$keepcache" ] && iopt="$iopt --setopt=keepcache=1"
|
||||
[ -n "$extra" ] && [ ${#extra_repos[@]} -ne 0 ] && $PKGCMD localinstall ${iopt:+$iopt} --nogpgcheck "${extra_repos[@]}"
|
||||
|
||||
$PKGCMD install ${iopt:+$iopt} "${pkgs[@]}"
|
||||
|
||||
elif [ "$os" == "opensuse-leap15.3" ]; then
|
||||
|
||||
[ -z "$interactive" ] && iopt="-y"
|
||||
[ -n "$dry" ] && iopt="--dry-run"
|
||||
[ -n "$keepcache" ] && zypper clean --all
|
||||
|
||||
zypper ref && zypper in --auto-agree-with-licenses --no-recommends "$iopt" "${pkgs[@]}"
|
||||
|
||||
else
|
||||
echo "Internal script error: invalid OS (${os}) after check (package installation)" >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -18,7 +18,6 @@ fi
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CORE_DIR="$SCRIPT_DIR/core"
|
||||
MODULES_DIR="$SCRIPT_DIR/modules"
|
||||
DEPS_DIR="$SCRIPT_DIR/deps"
|
||||
|
||||
# print
|
||||
source "$CORE_DIR/common.sh"
|
||||
@@ -132,10 +131,19 @@ bash "$CORE_DIR/openvino_logic.sh" "$URL" "$FILENAME"
|
||||
print_step "5. Integrity verification completed."
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# 6. Install system dependencies for OpenVINO
|
||||
# ------------------------------------------------------------------------------
|
||||
print_step "6. Installing system dependencies (Python, cmake, etc.)..."
|
||||
bash "$DEPS_DIR/install_openvino_dependencies.sh" -y
|
||||
# 6. Extract the tarball and install system dependencies from it (official flow)
|
||||
# ------------------------------------------------------------------------------
|
||||
print_step "6. Extracting tarball and installing system dependencies..."
|
||||
bash "$CORE_DIR/openvino_logic.sh" --extract "$FILENAME"
|
||||
|
||||
DEPS_SCRIPT="${FILENAME%.tgz}/install_dependencies/install_openvino_dependencies.sh"
|
||||
if [ ! -f "$DEPS_SCRIPT" ]; then
|
||||
print_error "Unexpected tarball layout: install_dependencies/ not found in the extracted folder."
|
||||
exit 1
|
||||
fi
|
||||
print_substep "Installing system dependencies from the tarball..."
|
||||
bash "$DEPS_SCRIPT" -y
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# 7. Install OpenVINO
|
||||
|
||||
Reference in New Issue
Block a user