From 572021aa82057631a6f263b76a955ad36161bff9 Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Wed, 15 Sep 2021 21:07:56 +0800 Subject: [PATCH] set proxy off when download vis_demo (#35754) --- paddle/fluid/inference/api/demo_ci/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/api/demo_ci/run.sh b/paddle/fluid/inference/api/demo_ci/run.sh index bf5de2d748..c0038f6c3f 100755 --- a/paddle/fluid/inference/api/demo_ci/run.sh +++ b/paddle/fluid/inference/api/demo_ci/run.sh @@ -23,6 +23,7 @@ TENSORRT_INCLUDE_DIR=$5 # TensorRT header file dir, default to /usr/local/Tensor TENSORRT_LIB_DIR=$6 # TensorRT lib file dir, default to /usr/local/TensorRT/lib MSVC_STATIC_CRT=$7 inference_install_dir=${PADDLE_ROOT}/build/paddle_inference_install_dir +WIN_DETECT=$(echo `uname` | grep "Win") # detect current platform cd `dirname $0` current_dir=`pwd` @@ -53,7 +54,11 @@ function download() { if [[ -e "${PREFIX}${dir_name}.tar.gz" ]]; then echo "${PREFIX}${dir_name}.tar.gz has been downloaded." else - wget -q ${URL_ROOT}$dir_name.tar.gz + if [ $WIN_DETECT != "" ]; then + wget -q -Y off ${URL_ROOT}$dir_name.tar.gz + else + wget -q --no-proxy ${URL_ROOT}$dir_name.tar.gz + fi tar xzf *.tar.gz fi cd .. -- GitLab