diff --git a/lmod/files/start_jupyter.sh b/lmod/files/start_jupyter.sh index 7381f00325a89f20364940d9ca7da332c1b1ab37..eae0160862c86b5b73f2e6df4008519aaa7588dc 100644 --- a/lmod/files/start_jupyter.sh +++ b/lmod/files/start_jupyter.sh @@ -16,6 +16,13 @@ set_env() { export PYTHONNOUSERSITE=1 export MODULEPATH=/p/software/jsccloud/productionstages export OTHERSTAGES=/p/software/jsccloud/productionstages + JUPYTER_FLAVOR_VARS=/tmp/custom/load_flavor_variables.sh + if [ -f $JUPYTER_FLAVOR_VARS ]; then + source $JUPYTER_FLAVOR_VARS + else + echo "File $JUPYTER_FLAVOR_VARS does not exist. Use 12h as default timeout." + export JUPYTERHUB_TIMEOUT=12h + fi echo "$(date) - Set environment variables done" } @@ -119,7 +126,7 @@ cleanup () { start () { echo "$(date) - Start jupyterhub-singleuser ..." - timeout 30d jupyterhub-singleuser 2>${JUPYTER_LOG_DIR}/stderr 1>${JUPYTER_LOG_DIR}/stdout + timeout $JUPYTERHUB_TIMEOUT jupyterhub-singleuser 2>${JUPYTER_LOG_DIR}/stderr 1>${JUPYTER_LOG_DIR}/stdout echo "$(date) - Start jupyterhub-singleuser done" }