From 9e2f1ad482f32b9ced92a2b78bce10f6956778c0 Mon Sep 17 00:00:00 2001 From: Emrul Date: Fri, 7 Mar 2025 12:57:30 +0000 Subject: [PATCH] Update on_sd_start.sh Added flag to skip starting uvicorn and waiting for keypress if INSTALL_ONLY environment variable is set to 1. This is to support non-interactive installation (e.g. for use in a Dockerfile) --- scripts/on_sd_start.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index e491ad2d..b55d9072 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -48,8 +48,11 @@ if [ -e "ldm" ]; then mv ldm ldm-old; fi python -m pip install -q torchruntime -cd .. -# Download the required packages -python scripts/check_modules.py --launch-uvicorn +# Skip the package download and prompt if INSTALL_ONLY=1 is set +if [ "$INSTALL_ONLY" != "1" ]; then + cd .. + # Download the required packages + python scripts/check_modules.py --launch-uvicorn -read -p "Press any key to continue" + read -p "Press any key to continue" +fi