Add rhel8 support (#8129)

This commit is contained in:
Dmitry Pigasin 2021-10-21 14:13:41 +03:00 committed by GitHub
parent a9119a3a3e
commit 0f282b687f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -84,6 +84,8 @@ if [[ -f /etc/centos-release ]]; then
DISTRO="centos" DISTRO="centos"
elif [[ -f /etc/lsb-release ]]; then elif [[ -f /etc/lsb-release ]]; then
DISTRO="ubuntu" DISTRO="ubuntu"
elif [[ -f /etc/redhat-release ]]; then
DISTRO="redhat"
fi fi
if [[ $DISTRO == "centos" ]]; then if [[ $DISTRO == "centos" ]]; then
@ -91,6 +93,8 @@ if [[ $DISTRO == "centos" ]]; then
if command -v python3.6 >/dev/null 2>&1; then if command -v python3.6 >/dev/null 2>&1; then
python_binary=python3.6 python_binary=python3.6
fi fi
elif [[ $DISTRO == "redhat" ]]; then
python_binary=python3
elif [[ $DISTRO == "ubuntu" ]]; then elif [[ $DISTRO == "ubuntu" ]]; then
python_binary=python3 python_binary=python3
elif [[ "$OSTYPE" == "darwin"* ]]; then elif [[ "$OSTYPE" == "darwin"* ]]; then
@ -130,7 +134,7 @@ fi
echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n" echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n"
model_dir=$(omz_info_dumper --name "$model_name" | model_dir=$(omz_info_dumper --name "$model_name" |
python -c 'import sys, json; print(json.load(sys.stdin)[0]["subdirectory"])') ${python_binary} -c 'import sys, json; print(json.load(sys.stdin)[0]["subdirectory"])')
print_and_run omz_downloader --name "$model_name" --output_dir "${models_path}" --cache_dir "${models_cache}" print_and_run omz_downloader --name "$model_name" --output_dir "${models_path}" --cache_dir "${models_cache}"

View File

@ -80,6 +80,8 @@ if [[ -f /etc/centos-release ]]; then
DISTRO="centos" DISTRO="centos"
elif [[ -f /etc/lsb-release ]]; then elif [[ -f /etc/lsb-release ]]; then
DISTRO="ubuntu" DISTRO="ubuntu"
elif [[ -f /etc/redhat-release ]]; then
DISTRO="redhat"
fi fi
if [[ $DISTRO == "centos" ]]; then if [[ $DISTRO == "centos" ]]; then
@ -87,6 +89,8 @@ if [[ $DISTRO == "centos" ]]; then
if command -v python3.6 >/dev/null 2>&1; then if command -v python3.6 >/dev/null 2>&1; then
python_binary=python3.6 python_binary=python3.6
fi fi
elif [[ $DISTRO == "redhat" ]]; then
python_binary=python3
elif [[ $DISTRO == "ubuntu" ]]; then elif [[ $DISTRO == "ubuntu" ]]; then
python_binary=python3 python_binary=python3
elif [[ "$OSTYPE" == "darwin"* ]]; then elif [[ "$OSTYPE" == "darwin"* ]]; then
@ -126,7 +130,7 @@ fi
echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n" echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n"
model_dir=$(omz_info_dumper --name "$model_name" | model_dir=$(omz_info_dumper --name "$model_name" |
python -c 'import sys, json; print(json.load(sys.stdin)[0]["subdirectory"])') ${python_binary} -c 'import sys, json; print(json.load(sys.stdin)[0]["subdirectory"])')
print_and_run omz_downloader --name "$model_name" --output_dir "${models_path}" --cache_dir "${models_cache}" print_and_run omz_downloader --name "$model_name" --output_dir "${models_path}" --cache_dir "${models_cache}"