mediapipe bazel build 设置代理proxy
bazel 支持代理设置, 参数中不能设置, 可以设置环境变量HTTPS_PROXY
注意大小写
Using Proxies
Bazel will pick up proxy addresses from the HTTPS_PROXY and HTTP_PROXY environment variables and use these to download HTTP/HTTPS files (if specified).
powershell
PowerShell - CMD 设置HTTPHTTPS代理
$env:HTTPS_PROXY="http://127.0.0.1:1080"
$env:HTTP_PROXY="http://127.0.0.1:1080"
$env:all_proxy="socks5://127.0.0.1:1081"
cmd
set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080
linux bash
export HTTPS_PROXY="http://192.168.56.1:1080"
export HTTP_PROXY="http://192.168.56.1:1080"
注意
关闭窗口后, 再打开新窗口需要重新设置环境变量
移除
remove-item env:HTTPS_PROXY
bazel --host_jvm_args "-DsocksProxyHost=192.168.56.1 -DsocksProxyPort=1080" run --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH=/usr/bin/btpython mediapipe/examples/desktop/hello_world
使用socks5 Dsocks5ProxyHost
--host_jvm_args "-Dsocks5ProxyHost=192.168.56.1 -Dsocks5ProxyPort=1080"