Skip to content

Commit bce131d

Browse files
authored
Merge pull request #62 from MooreThreads/test_git_lfs
vllm-mtt 在线下载模型新增进度条
2 parents 3a541d7 + 27fa76c commit bce131d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

vllm/demo/run_vllm_serving.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,24 @@ check_and_prepare_model() {
167167
echo -e "\e[32mconverted_model_path: $converted_model_path\e[0m" >&2
168168
apt-get update -qq >&2 && apt-get install -y --no-install-recommends git-lfs jq >&2
169169
git lfs install >&2
170-
git clone "$model_url" "$model_path" >&2 # TODO(wangkang): need check for clone if successful
170+
GIT_LFS_SKIP_SMUDGE=1 git clone "$model_url" "$model_path" >&2
171+
if [ $? -ne 0 ]; then
172+
echo "Error: git clone failed." >&2
173+
exit 1
174+
fi
175+
176+
cd "$model_path" || { echo "Error: failed to cd into $model_path" >&2; exit 1; }
177+
178+
# 显示需要下载的 LFS 文件(可选)
179+
git lfs ls-files >&2
180+
181+
# 拉取大文件(带进度条)
182+
echo -e "\e[32m正在下载模型,请耐心等待...\e[0m" >&2
183+
git lfs pull >&2
184+
if [ $? -ne 0 ]; then
185+
echo "Error: git lfs pull failed." >&2
186+
exit 1
187+
fi
171188
echo "√ Model download completed." >&2
172189

173190

0 commit comments

Comments
 (0)