1# linux 端运行
2export HF_ENDPOINT=https://hf-mirror.com
3
4# powershell 端运行
5$env:HF_ENDPOINT = "https://hf-mirror.com"
6
7# 下载指定模型的仓库
8hf download onnx-community/gemma-3-270m-it-ONNX --local-dir ./models/onnx-community/gemma-3-270m-it-ONNX
9
10hf download onnx-community/Qwen3-0.6B-ONNX --local-dir ./models/onnx-community/Qwen3-0.6B-ONNX --exclude onnx/*
11hf download onnx-community/Qwen3-0.6B-ONNX --local-dir ./models/onnx-community/Qwen3-0.6B-ONNX --include onnx/model_f16.onnx
12
13hf download microsoft/Phi-3-mini-128k-instruct-onnx --local-dir . --include directml/*1、用户级(最常用,当前系统用户生效)
2、pip.conf 配置案例
1[global]
2# http/https代理
3proxy = http://127.0.0.1:7890
4
5# socks5 代理写法
6# proxy = socks5://127.0.0.1:7890
7
8# 带账号密码
9# proxy = http://username:password@127.0.0.1:7890
10
11# 可选:同时配置国内镜像加速
12index-url = https://pypi.tuna.tsinghua.edu.cn/simple3、pip config 命令行管理配置(无需手动改文件)
1# http代理
2pip config set global.proxy http://127.0.0.1:7890
3# socks5
4pip config set global.proxy socks5://127.0.0.1:7890
5# 带账号密码
6pip config set global.proxy http://user:123456@192.168.1.5:1080
7
8# 查看当前 pip 配置
9pip config list
10
11# 删除代理配置(关闭代理)
12pip config unset global.proxy
13
14# 单次命令忽略代理
15pip install xxx --no-proxy1npm config set proxy http://127.0.0.1:10809
2npm config set https-proxy http://127.0.0.1:108091git config -l # 查看所有配置
2
3# 设置全局 HTTP/HTTPS 代理
4git config --global http.proxy http://127.0.0.1:10809
5git config --global https.proxy http://127.0.0.1:10809
6
7git config --global http.proxy http://192.168.31.219:10809
8git config --global https.proxy http://192.168.31.219:10809
9
10# 设置 SOCKS5 代理(如 Shadowsocks/V2Ray)
11git config --global http.proxy socks5://127.0.0.1:10808
12git config --global https.proxy socks5://127.0.0.1:10808在 /lib/systemd/system/docker.service 的 [Service] 下添加以下内容
1[Service]
2Environment="HTTP_PROXY=http://192.168.32.219:10809"
3Environment="HTTPS_PROXY=http://192.168.32.219:10809"
4Environment="NO_PROXY=localhost,127.0.0.1,*.yourdomain.com"systemctl daemon-reload && systemctl restart docker
从 Go 1.11 版本开始,可以通过设置 GOPROXY 环境变量来指定代理服务器。国内用户可以使用以下命令设置为国内代理。
1go env -w GOPROXY=https://goproxy.cn,direct