InternLM-Math commited on
Commit
a817d18
1 Parent(s): b694e0c

Create install_lmdeploy.sh

Browse files
Files changed (1) hide show
  1. install_lmdeploy.sh +27 -0
install_lmdeploy.sh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # 安装lmdeploy
4
+ # 获取安装lmdeploy的位置下的lib文件夹路径
5
+ lmdeploy_dir=$(pip show lmdeploy | grep Location | cut -d' ' -f2)
6
+ lib_dir="${lmdeploy_dir}/lmdeploy/lib"
7
+
8
+ # 检查lib目录是否存在
9
+ if [ ! -d "$lib_dir" ]
10
+ then
11
+ echo "Lib directory does not exist at ${lib_dir}"
12
+ exit 1
13
+ fi
14
+
15
+ # 克隆lmdeploy的仓库
16
+ git clone https://github.com/InternLM/lmdeploy.git || exit 1
17
+
18
+ # 将lib文件夹拷贝到刚刚克隆的lmdeploy下
19
+ cp -r "$lib_dir" "lmdeploy/lmdeploy/" || exit 1
20
+
21
+ pip uninstall -y lmdeploy
22
+
23
+ cd lmdeploy && git checkout v0.2.1 && cd ..
24
+ mv lmdeploy lmdeploy-backup
25
+ mv lmdeploy-backup/lmdeploy lmdeploy
26
+
27
+ echo "Script executed successfully"