install_openvino_dependencies.sh update (#9398)
* Remove opencv requirements from default components list * Remove opencv requirements from default components list * fix typo
This commit is contained in:
parent
95d86eb2bf
commit
4188dbbf9f
@ -8,7 +8,8 @@ set -e
|
||||
#===================================================================================================
|
||||
# Option parsing
|
||||
|
||||
all_comp=(opencv_req opencv_opt python dev myriad installer cl_compiler)
|
||||
default_comp=(dev python myriad cl_compiler)
|
||||
all_comp=(${default_comp[@]} opencv_req opencv_opt)
|
||||
os=${os:-auto}
|
||||
|
||||
# public options
|
||||
@ -29,7 +30,7 @@ while :; do
|
||||
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 (CentOS 7) (off)"
|
||||
echo " -e add extra repositories (RHEL 8) (off)"
|
||||
echo " -p print package list and exit (off)"
|
||||
exit
|
||||
;;
|
||||
@ -45,16 +46,16 @@ while :; do
|
||||
shift
|
||||
done
|
||||
|
||||
# No components selected - install all
|
||||
# No components selected - install default
|
||||
if [ ${#comp[@]} -eq 0 ]; then
|
||||
comp=(${all_comp[@]})
|
||||
comp=(${default_comp[@]})
|
||||
fi
|
||||
|
||||
#===================================================================================================
|
||||
# Selftest
|
||||
|
||||
if [ -n "$selftest" ] ; then
|
||||
for image in centos:7 ubuntu:18.04 ubuntu:20.04 ; do
|
||||
for image in ubuntu:18.04 ubuntu:20.04 redhat/ubi8 ; do
|
||||
for opt in "-h" "-p" "-e -p" "-n" "-n -e" "-y" "-y -e" ; do
|
||||
echo "||"
|
||||
echo "|| Test $image / '$opt'"
|
||||
@ -86,7 +87,7 @@ if [ "$os" == "auto" ] ; then
|
||||
os="rhel8"
|
||||
fi
|
||||
case $os in
|
||||
centos7|rhel8|ubuntu18.04|ubuntu20.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;;
|
||||
rhel8|ubuntu18.04|ubuntu20.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;;
|
||||
*) echo "Unsupported OS: ${os:-detection failed}" >&2 ; exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
@ -102,7 +103,6 @@ if [ "$os" == "ubuntu18.04" ] ; then
|
||||
pkgs_python=(python3 python3-dev python3-venv python3-setuptools python3-pip)
|
||||
pkgs_dev=(cmake g++ gcc libc6-dev make curl sudo)
|
||||
pkgs_myriad=(libusb-1.0-0)
|
||||
pkgs_installer=(cpio)
|
||||
pkgs_cl_compiler=(libtinfo5)
|
||||
pkgs_opencv_opt=(
|
||||
gstreamer1.0-plugins-bad
|
||||
@ -124,7 +124,6 @@ elif [ "$os" == "ubuntu20.04" ] ; then
|
||||
pkgs_python=(python3 python3-dev python3-venv python3-setuptools python3-pip)
|
||||
pkgs_dev=(cmake g++ gcc libc6-dev make curl sudo)
|
||||
pkgs_myriad=(libusb-1.0-0)
|
||||
pkgs_installer=(cpio)
|
||||
pkgs_cl_compiler=(libtinfo5)
|
||||
pkgs_opencv_opt=(
|
||||
gstreamer1.0-plugins-bad
|
||||
@ -146,7 +145,6 @@ elif [ "$os" == "rhel8" ] ; then
|
||||
pkgs_python=(python3 python3-devel python3-setuptools python3-pip)
|
||||
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake curl sudo)
|
||||
pkgs_myriad=()
|
||||
pkgs_installer=()
|
||||
pkgs_opencv_opt=(
|
||||
gstreamer1
|
||||
gstreamer1-plugins-bad-free
|
||||
@ -155,29 +153,6 @@ elif [ "$os" == "rhel8" ] ; then
|
||||
)
|
||||
extra_repos+=(https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm)
|
||||
|
||||
elif [ "$os" == "centos7" ] ; then
|
||||
|
||||
# find -name *.so -exec objdump -p {} \; | grep NEEDED | sort -u | cut -c 23- | xargs -t -n1 yum -q whatprovides
|
||||
|
||||
pkgs_opencv_req=(gtk2)
|
||||
pkgs_python=(python3 python3-devel python3-setuptools python3-pip)
|
||||
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake curl sudo)
|
||||
pkgs_myriad=(libusbx)
|
||||
pkgs_installer=()
|
||||
pkgs_cl_compiler=()
|
||||
pkgs_opencv_opt=(
|
||||
gstreamer1
|
||||
gstreamer1-plugins-bad-free
|
||||
gstreamer1-plugins-good
|
||||
gstreamer1-plugins-ugly-free
|
||||
)
|
||||
|
||||
if [ -n "$extra" ] ; then
|
||||
# 1 RPMFusion
|
||||
extra_repos+=(https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm)
|
||||
pkgs_opencv_opt+=(ffmpeg-libs)
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Internal script error: invalid OS after check (package selection)" >&2
|
||||
exit 3
|
||||
@ -226,7 +201,7 @@ if [ "$os" == "ubuntu18.04" ] || [ "$os" == "ubuntu20.04" ] ; then
|
||||
|
||||
apt-get update && apt-get install --no-install-recommends $iopt ${pkgs[@]}
|
||||
|
||||
elif [ "$os" == "centos7" ] || [ "$os" == "rhel8" ] ; then
|
||||
elif [ "$os" == "rhel8" ] ; then
|
||||
|
||||
[ -z "$interactive" ] && iopt="--assumeyes"
|
||||
[ -n "$dry" ] && iopt="--downloadonly"
|
||||
|
Loading…
Reference in New Issue
Block a user