Add uv pip install pip

This commit is contained in:
litagin02
2024-06-01 21:22:59 +09:00
parent 31b709eef6
commit f10dade139
5 changed files with 21 additions and 3 deletions

View File

@@ -6,12 +6,13 @@
!/style_bert_vits2/
!/bert/deberta-v2-large-japanese-char-wwm/
!/common/
!/configs/
!/dict_data/default.csv
!/model_assets/
!/static/
!/config.py
!/default_config.yml
!/initialize.py
!/requirements.txt
!/server_editor.py

View File

@@ -20,4 +20,4 @@ COPY --chown=user . $HOME/app
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
# 必要に応じて制限を変更してください
CMD ["python", "server_editor.py", "--line_length", "50", "--line_count", "3"]
CMD ["python", "server_editor.py", "--line_length", "50", "--line_count", "3", "--skip_static_files"]

View File

@@ -107,6 +107,13 @@ echo Executing: pip install uv
pip install uv
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
echo --------------------------------------------------
echo Installing pip for compatibility...
echo --------------------------------------------------
echo Executing: uv pip install pip
uv pip install pip
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
echo --------------------------------------------------
echo Installing dependencies...
echo --------------------------------------------------

View File

@@ -107,6 +107,13 @@ echo Executing: pip install uv
pip install uv
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
echo --------------------------------------------------
echo Installing pip for compatibility...
echo --------------------------------------------------
echo Executing: uv pip install pip
uv pip install pip
if !errorlevel! neq 0 ( pause & popd & exit /b !errorlevel! )
echo --------------------------------------------------
echo Installing PyTorch...
echo --------------------------------------------------

View File

@@ -184,6 +184,7 @@ parser.add_argument("--inbrowser", action="store_true")
parser.add_argument("--line_length", type=int, default=None)
parser.add_argument("--line_count", type=int, default=None)
parser.add_argument("--skip_default_models", action="store_true")
parser.add_argument("--skip_static_files", action="store_true")
args = parser.parse_args()
device = args.device
if device == "cuda" and not torch.cuda.is_available():
@@ -192,6 +193,7 @@ model_dir = Path(args.model_dir)
port = int(args.port)
if not args.skip_default_models:
download_default_models()
skip_static_files = bool(args.skip_static_files)
model_holder = TTSModelHolder(model_dir, device)
if len(model_holder.model_names) == 0:
@@ -440,6 +442,7 @@ def delete_user_dict_word(uuid: str):
app.include_router(router, prefix="/api")
if __name__ == "__main__":
if not skip_static_files:
download_static_files("litagin02", "Style-Bert-VITS2-Editor", "out.zip")
app.mount("/", StaticFiles(directory=STATIC_DIR, html=True), name="static")
if args.inbrowser: