Skip to content

Commit 9b2c8b5

Browse files
committed
在线下载模型,带进度条
1 parent 3a541d7 commit 9b2c8b5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

vllm/demo/run_vllm_serving.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,23 @@ 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+
git lfs pull >&2
183+
if [ $? -ne 0 ]; then
184+
echo "Error: git lfs pull failed." >&2
185+
exit 1
186+
fi
171187
echo "√ Model download completed." >&2
172188

173189

0 commit comments

Comments
 (0)