有时候服务器不能直接访问 github,下载代码会很麻烦;安装库的时候,pip xx @git 就更难了
比如,这次我需要安装 unsloth,官方给出的脚本是:
pip install “unsloth[cu121-torch220] @ git+https://github.com/unslothai/unsloth.git”
unsloth repo 下载后,没有常见的 setup.py 文件,这要如何处理呢? 我没有找到合适的方法
看一些教程,发现 学术加速的方法:https://mirror.ghproxy.com
我可以在服务器上,这样下载 git:
git clone https://mirror.ghproxy.com/https://github.com/unslothai/unsloth.git
那么是否可以按这个模式 安装呢? 尝试了下,是可行的:
pip install “unsloth[cu121-torch211] @ git+https://mirror.ghproxy.com/https://github.com/unslothai/unsloth.git”
有时候会报下述错误,但再尝试一次就好了
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
2024-07-13(六)