编程中遇到一些小问题


持续更新

hugging face

  1. 国内无法访问,并且代码中设置环境变量无效
    .venv/lib/python/site-packages/huggingface_hub/constants.py 文件中修改
_HF_DEFAULT_ENDPOINT = "https://hf-mirror.com"

ssh

  1. 开启网络转发命令
ssh -vvv -N -R 7890:localhost:7890 username@ip

详细可以查看如何在服务器上进行网络转发
2. 使用ssh连接github推送,进行端口转发
修改.ssh/config

Host github.com
  User git
  ProxyCommand nc -X 5 -x 127.0.0.1:7890 %h %p

uv

1.国内安装python很慢

export UV_PYTHON_INSTALL_MIRROR=https://registry.npmmirror.com/-/binary/python-build-standalone
  1. 创建虚拟环境指定python版本
uv init [路径] -p 3.10
posted @ 2025-07-15 20:28  遇事逢舟  阅读(12)  评论(0)    收藏  举报