Skip to content

Instantly share code, notes, and snippets.

@ravi9
Last active April 4, 2023 16:25
Show Gist options
  • Save ravi9/1b72155fe49770de16666d3865295c51 to your computer and use it in GitHub Desktop.
Save ravi9/1b72155fe49770de16666d3865295c51 to your computer and use it in GitHub Desktop.
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# !/bin/bash
## OPTIONAL PARAMS ##
# PROXY Settings, uncomment the below 2 lines for setting proxy.
# http_proxy="http_proxy=http://my-proxy.com:911"
# https_proxy="https_proxy=http://my-proxy.com:911"
## No changes needed below ##
# working directory
echo "Script is executed from : ${PWD}"
# Pull pre-build OpenVINO Model server (OVMS) container
cmd_pull_ovms_container="docker pull openvino/model_server:latest"
echo "Starting: Docker pull OpenVINO model server"
echo $cmd_pull_ovms_container
# Clone model_server git repo
cmd_clone_ovms="git clone https://github.com/openvinotoolkit/model_server.git"
echo "** Cloning model_server git repo at : ${PWD} **"
echo $cmd_clone_ovms
eval $cmd_clone_ovms
model_server_dir="${PWD}/model_server/demos/benchmark/python"
# Build benchmark app client container
cmd_cd="cd $model_server_dir"
echo $cmd_cd
eval $cmd_cd
proxy_build_args=""
if [ -n "$http_proxy" ]; then
proxy_build_args+=" --build-arg HTTP_PROXY=${http_proxy} "
fi
if [ -n "$https_proxy" ]; then
proxy_build_args+=" --build-arg HTTPS_PROXY=${https_proxy} "
fi
cmd_build_bm_client_docker="docker build . -t benchmark_client $proxy_build_args "
echo "** Building benchmark_client app docker **"
echo $cmd_build_bm_client_docker
eval $cmd_build_bm_client_docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment