From 7c5453d15d40bcf87f88962df8d48475b2578d1d Mon Sep 17 00:00:00 2001 From: Cyber-BlackCat Date: Sat, 22 Feb 2025 11:06:27 +0800 Subject: [PATCH] modify some bug when create venv and train lora using a linux system linux in China. (#628) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update requirements.txt modify numpy version * 中国大陆linux系统服务器使用bash run_gui_sourceCN.sh 启动此脚本 自动激活创建好的虚拟环境,将国内镜像替换原网站,解决了分词器等下载失败的问题。 --- requirements.txt | 3 ++- run_gui_sourceCN.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 run_gui_sourceCN.sh diff --git a/requirements.txt b/requirements.txt index d16c9eb..77103b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,7 +29,8 @@ pandas scipy requests pillow -numpy<=2.0 +numpy==1.26.4 +# <=2.0.0 gradio==3.44.2 fastapi==0.95.1 uvicorn==0.22.0 diff --git a/run_gui_sourceCN.sh b/run_gui_sourceCN.sh new file mode 100644 index 0000000..3e6712e --- /dev/null +++ b/run_gui_sourceCN.sh @@ -0,0 +1,15 @@ +#!/bin/bash + + +# 激活虚拟环境 +source "./venv/bin/activate" + +# 环境变量 +export HF_HOME=huggingface +# 国内hg镜像 +export HF_ENDPOINT=https://hf-mirror.com +export PYTHONUTF8=1 + +python gui.py --listen --tensorboard-port 6006 --port 28000 "$@" + +