Skip to content

Commit

Permalink
start-notebook.sh: pass NOTEBOOK_ARGS as docs say
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 6, 2020
1 parent 63295ba commit d63c09c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions base-notebook/start-notebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@

set -e

if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
echo "WARNING: use start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
exec /usr/local/bin/start-singleuser.sh "$@"
exit
fi

wrapper=""
if [[ "${RESTARTABLE}" == "yes" ]]; then
wrapper="run-one-constantly"
fi

if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
# launched by JupyterHub, use single-user entrypoint
exec /usr/local/bin/start-singleuser.sh "$@"
elif [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
. /usr/local/bin/start.sh $wrapper jupyter lab "$@"
if [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
exec /usr/local/bin/start.sh $wrapper $NOTEBOOK_ARGS jupyter lab "$@"
else
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
exec /usr/local/bin/start.sh $wrapper $NOTEBOOK_ARGS jupyter notebook "$@"
fi

0 comments on commit d63c09c

Please sign in to comment.