Skip to content

Commit e11f31a

Browse files
consideRatiomaresb
authored andcommitted
start-notebook.sh: pass NOTEBOOK_ARGS as docs say
1 parent 8dfdbfd commit e11f31a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

base-notebook/start-notebook.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@
44

55
set -e
66

7+
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
8+
echo "WARNING: use start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
9+
exec /usr/local/bin/start-singleuser.sh "$@"
10+
exit
11+
fi
12+
713
wrapper=""
814
if [[ "${RESTARTABLE}" == "yes" ]]; then
915
wrapper="run-one-constantly"
1016
fi
1117

12-
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
13-
# launched by JupyterHub, use single-user entrypoint
14-
exec /usr/local/bin/start-singleuser.sh "$@"
15-
elif [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
16-
# shellcheck disable=SC1091
17-
. /usr/local/bin/start.sh ${wrapper} jupyter lab "$@"
18+
if [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
19+
# shellcheck disable=SC1091,SC2086
20+
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter lab "$@"
1821
else
1922
echo "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
20-
# shellcheck disable=SC1091
21-
. /usr/local/bin/start.sh ${wrapper} jupyter notebook "$@"
23+
# shellcheck disable=SC1091,SC2086
24+
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter notebook "$@"
2225
fi

0 commit comments

Comments
 (0)