Spaces:
Runtime error
Runtime error
Download install_lmdeploy.sh from faqvfsbrtht/internlm2-math-7b: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/spaces/faqvfsbrtht/internlm2-math-7b/resolve/main/install_lmdeploy.sh
- Command line
-
hf download hf://spaces/faqvfsbrtht/internlm2-math-7b/install_lmdeploy.sh
-
curl -L -o install_lmdeploy.sh https://huggingface.co/spaces/faqvfsbrtht/internlm2-math-7b/resolve/main/install_lmdeploy.sh
682 Bytes
| # 安装lmdeploy | |
| # 获取安装lmdeploy的位置下的lib文件夹路径 | |
| lmdeploy_dir=$(pip show lmdeploy | grep Location | cut -d' ' -f2) | |
| lib_dir="${lmdeploy_dir}/lmdeploy/lib" | |
| # 检查lib目录是否存在 | |
| if [ ! -d "$lib_dir" ] | |
| then | |
| echo "Lib directory does not exist at ${lib_dir}" | |
| exit 1 | |
| fi | |
| # 克隆lmdeploy的仓库 | |
| git clone https://github.com/InternLM/lmdeploy.git || exit 1 | |
| # 将lib文件夹拷贝到刚刚克隆的lmdeploy下 | |
| cp -r "$lib_dir" "lmdeploy/lmdeploy/" || exit 1 | |
| pip uninstall -y lmdeploy | |
| cd lmdeploy && git checkout v0.2.1 && cd .. | |
| mv lmdeploy lmdeploy-backup | |
| mv lmdeploy-backup/lmdeploy lmdeploy | |
| echo "Script executed successfully" | |