Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start-notebook.sh: pass NOTEBOOK_ARGS as docs say #1527

Merged
merged 5 commits into from
Nov 15, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions base-notebook/start-notebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@

set -e

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

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

if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
# launched by JupyterHub, use single-user entrypoint
exec /usr/local/bin/start-singleuser.sh "$@"
elif [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
# shellcheck disable=SC1091
. /usr/local/bin/start.sh ${wrapper} jupyter lab "$@"
if [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
# shellcheck disable=SC1091,SC2086
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter lab "$@"
else
echo "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
# shellcheck disable=SC1091
. /usr/local/bin/start.sh ${wrapper} jupyter notebook "$@"
echo "WARNING: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
# shellcheck disable=SC1091,SC2086
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter notebook "$@"
fi