# 获取git url最后的directory的name
REPO_BNAME=`basename $REPO_URL`
REPO_NAME=${REPO_BNAME%.*}
echo "Cloning $REPO_URL ..."
printf "${RED}Failed cloning the repo $REPO_URL, retrying...${COLOR_END}\n"
if [[ -d "$REPO_NAME" ]]; then
echo "Removing the $REPO_NAME directory"
printf "${GREEN}Clone $REPO_URL successfully, done${COLOR_END}\n"
# 运行webui-demo或在测试集evaluate时所需训好的checkpoint移动到数据盘
mv /root/checkpoints /root/autodl-tmp
# 将镜像中已带的预训练llama2-7b的权重移动到数据盘
mv /root/Llama-2-7b-hf /root/autodl-tmp
# 下载chatglm3-6b; modelscope上有很多大的bin model文件;
clone_repo https://www.modelscope.cn/ZhipuAI/chatglm3-6b.git
# 下载fine-tuning-lab v3; 注意,checkout到branch v3
clone_repo https://github.com/agiclass/fine-tuning-lab.git -b v3
printf "${GREEN}ALL Done${COLOR_END}\n"