diff --git a/.dockerignore b/.dockerignore index da10b92..bf1b3a0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -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 diff --git a/Dockerfile.deploy b/Dockerfile.deploy index dd351d1..48c22d0 100644 --- a/Dockerfile.deploy +++ b/Dockerfile.deploy @@ -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"] diff --git a/scripts/Install-Style-Bert-VITS2-CPU.bat b/scripts/Install-Style-Bert-VITS2-CPU.bat index e9d7419..9cdb5ef 100644 --- a/scripts/Install-Style-Bert-VITS2-CPU.bat +++ b/scripts/Install-Style-Bert-VITS2-CPU.bat @@ -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 -------------------------------------------------- diff --git a/scripts/Install-Style-Bert-VITS2.bat b/scripts/Install-Style-Bert-VITS2.bat index 62eb2b2..6538988 100644 --- a/scripts/Install-Style-Bert-VITS2.bat +++ b/scripts/Install-Style-Bert-VITS2.bat @@ -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 -------------------------------------------------- diff --git a/server_editor.py b/server_editor.py index 2a5dabc..8caea47 100644 --- a/server_editor.py +++ b/server_editor.py @@ -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}")