Browse Source

Configurable launch script

Andrew Savchyn 2 years ago
parent
commit
fcfe2e9ffd
2 changed files with 9 additions and 1 deletions
  1. 3 0
      webui-user.sh
  2. 6 1
      webui.sh

+ 3 - 0
webui-user.sh

@@ -21,6 +21,9 @@ export COMMANDLINE_ARGS=""
 # python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
 #venv_dir="venv"
 
+# script to launch to start the app
+#export launch_script="launch.py"
+
 # install command for torch
 #export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
 

+ 6 - 1
webui.sh

@@ -41,6 +41,11 @@ then
     venv_dir="venv"
 fi
 
+if [[ -z "${launch_script}" ]]
+then
+    launch_script="launch.py"
+fi
+
 # Disable sentry logging
 export ERROR_REPORTING=FALSE
 
@@ -133,4 +138,4 @@ fi
 printf "\n%s\n" "${delimiter}"
 printf "Launching launch.py..."
 printf "\n%s\n" "${delimiter}"
-"${python_cmd}" launch.py
+"${python_cmd}" "${launch_script}"