Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add script to quick start the web UI and check env
- Loading branch information
王帅
committed
Mar 14, 2024
1 parent
ed49c36
commit cdb6303
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# 建议使用 魔搭社区 下载资源挺快的, | ||
export USE_MODELSCOPE_HUB=1 | ||
# 目前好像只能用一个显卡,暂时先这样,后续再考虑 | ||
export CUDA_VISIBLE_DEVICES=0 | ||
# check requirement | ||
python src/check_requirement.py | ||
python src/train_web.py > llama-factory.log 2>&1 | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "The llama factory webUI server has been started successfully," | ||
echo "Access the address at http://0.0.0.0:7861" | ||
else | ||
echo "start webUI failed, Please check the log llama-factory.log" | ||
fi | ||
echo "The log path is $(pwd)/llama-factory.log" |