Add uv pip install pip
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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 --------------------------------------------------
|
||||
|
||||
@@ -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 --------------------------------------------------
|
||||
|
||||
@@ -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,7 +442,8 @@ def delete_user_dict_word(uuid: str):
|
||||
app.include_router(router, prefix="/api")
|
||||
|
||||
if __name__ == "__main__":
|
||||
download_static_files("litagin02", "Style-Bert-VITS2-Editor", "out.zip")
|
||||
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:
|
||||
webbrowser.open(f"http://localhost:{port}")
|
||||
|
||||
Reference in New Issue
Block a user