-
Notifications
You must be signed in to change notification settings - Fork 9
/
install_run.sh
58 lines (44 loc) · 1.07 KB
/
install_run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#git clone https://github.com/piglaker/MOSS_Retrieval.git
FILE=serper_key
if [ -f "$FILE" ]; then
echo "$FILE exist"
else
echo -n "Enter your key:"
read key
echo ${key} > serper_key
fi
if [[ $(which docker) && $(docker --version) ]]; then
echo "检查到Docker已安装!"
else
echo "安装docker环境..."
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
echo "安装docker环境...安装完成!"
fi
systemctl start docker
docker login
docker pull piglake/retrieval:0.7
CC_EN=cc.en.300.bin.gz
CC_ZH=cc.zh.300.bin.gz
if [ -f "$CC_EN" ]; then
echo "$CC_EN exist"
else
wget https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.en.300.bin.gz
fi
if [ -f "$CC_ZH" ]; then
echo "$CC_ZH exist"
else
wget https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.zh.300.bin.gz
fi
EN_Bin=cc.en.300.bin
ZH_Bin=cc.zh.300.bin
if [ -f "$EN_Bin" ]; then
echo "$EN_Bin exist"
else
gunzip cc.en.300.bin.gz
fi
if [ -f "$ZH_Bin" ]; then
echo "$ZH_Bin exist"
else
gunzip cc.zh.300.bin.gz
fi
bash docker_run.sh