From 379dc475e49d83af874afa698df0dd32abe877eb Mon Sep 17 00:00:00 2001 From: Julien 'Lta' BALLET Date: Fri, 8 Mar 2024 18:27:49 +0100 Subject: [PATCH] Make post_start.sh and other scripts configurable by env vars --- a1111/webui-user.sh | 6 +++++- scripts/start.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/a1111/webui-user.sh b/a1111/webui-user.sh index 90ed013..4fae412 100755 --- a/a1111/webui-user.sh +++ b/a1111/webui-user.sh @@ -10,7 +10,7 @@ install_dir="/workspace" #clone_dir="stable-diffusion-webui" # Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention" -export COMMANDLINE_ARGS="--port 3001 --skip-install --listen --api --xformers --enable-insecure-extension-access --no-half-vae" +export COMMANDLINE_ARGS="--port 3001 --skip-install --listen --api --xformers --enable-insecure-extension-access --no-half-vae ${A1111_EXTRA_ARGS}" # python3 executable #python_cmd="python3" @@ -46,4 +46,8 @@ venv_dir=VENV_PATH # Uncomment to disable TCMalloc #export NO_TCMALLOC="True" +WEBUI_USER_LOCAL=${WEBUI_USER_LOCAL:-./webui-user.local.sh} +if [ -e "$WEBUI_USER_LOCAL" ]; then + source "$WEBUI_USER_LOCAL" +fi ########################################### diff --git a/scripts/start.sh b/scripts/start.sh index 9323b2a..83bbcd2 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -148,6 +148,6 @@ start_runpod_uploader execute_script "/pre_start.sh" "Running pre-start script..." configure_filezilla export_env_vars -execute_script "/post_start.sh" "Running post-start script..." +execute_script "${POST_START_SH:-/post_start.sh}" "Running post-start script..." echo "Container is READY!" sleep infinity