代码拉取完成,页面将自动刷新
#!/usr/bin/env bash
work_dir=$(realpath "$(dirname $0)")
venv_dir=$1
if [ -z "$venv_dir" ]; then
venv_dir=venv
fi
cd ${work_dir}
if [[ -e ${venv_dir} ]]; then
echo
echo "Virtualenv already exists. Use command to start working:"
echo "$ . ${venv_dir}/bin/activate"
exit
fi
# Create virtual environment
virtualenv ${venv_dir} -p python --prompt="(venv)"
path_openvino_vars="${INTEL_OPENVINO_DIR:-/opt/intel/openvino}/bin/setupvars.sh"
if [[ -e "${path_openvino_vars}" ]]; then
echo ". ${path_openvino_vars}" >>${venv_dir}/bin/activate
fi
. ${venv_dir}/bin/activate
cat requirements.txt | xargs -n 1 -L 1 pip3 install
mo_requirements_file="${INTEL_OPENVINO_DIR:-/opt/intel/openvino}/deployment_tools/model_optimizer/requirements_onnx.txt"
if [[ -e "${mo_requirements_file}" ]]; then
pip install -qr ${mo_requirements_file}
else
echo "[WARNING] Model optimizer requirements were not installed. Please install the OpenVino toolkit to use one."
fi
echo
echo "Activate a virtual environment to start working:"
echo "$ . ${venv_dir}/bin/activate"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。