Skip to content

Commit

Permalink
Add rhel8 support (openvinotoolkit#8129)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpigasin authored Oct 21, 2021
1 parent a9119a3 commit 0f282b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/demo/run_sample_benchmark_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ if [[ -f /etc/centos-release ]]; then
DISTRO="centos"
elif [[ -f /etc/lsb-release ]]; then
DISTRO="ubuntu"
elif [[ -f /etc/redhat-release ]]; then
DISTRO="redhat"
fi

if [[ $DISTRO == "centos" ]]; then
# check installed Python version
if command -v python3.6 >/dev/null 2>&1; then
python_binary=python3.6
fi
elif [[ $DISTRO == "redhat" ]]; then
python_binary=python3
elif [[ $DISTRO == "ubuntu" ]]; then
python_binary=python3
elif [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down Expand Up @@ -130,7 +134,7 @@ fi
echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n"

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}"

Expand Down
6 changes: 5 additions & 1 deletion scripts/demo/run_sample_squeezenet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@ if [[ -f /etc/centos-release ]]; then
DISTRO="centos"
elif [[ -f /etc/lsb-release ]]; then
DISTRO="ubuntu"
elif [[ -f /etc/redhat-release ]]; then
DISTRO="redhat"
fi

if [[ $DISTRO == "centos" ]]; then
# check installed Python version
if command -v python3.6 >/dev/null 2>&1; then
python_binary=python3.6
fi
elif [[ $DISTRO == "redhat" ]]; then
python_binary=python3
elif [[ $DISTRO == "ubuntu" ]]; then
python_binary=python3
elif [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down Expand Up @@ -126,7 +130,7 @@ fi
echo -ne "\n###############|| Downloading the Caffe model and the prototxt ||###############\n\n"

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}"

Expand Down

0 comments on commit 0f282b6

Please sign in to comment.