mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 23:12:56 +00:00
Merge pull request #1527 from maresb/notebook_args
start-notebook.sh: pass NOTEBOOK_ARGS as docs say
This commit is contained in:
@@ -4,19 +4,21 @@
|
|||||||
|
|
||||||
set -e
|
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=""
|
wrapper=""
|
||||||
if [[ "${RESTARTABLE}" == "yes" ]]; then
|
if [[ "${RESTARTABLE}" == "yes" ]]; then
|
||||||
wrapper="run-one-constantly"
|
wrapper="run-one-constantly"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
|
if [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
|
||||||
# launched by JupyterHub, use single-user entrypoint
|
# shellcheck disable=SC1091,SC2086
|
||||||
exec /usr/local/bin/start-singleuser.sh "$@"
|
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter lab "$@"
|
||||||
elif [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /usr/local/bin/start.sh ${wrapper} jupyter lab "$@"
|
|
||||||
else
|
else
|
||||||
echo "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
|
echo "WARNING: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091,SC2086
|
||||||
. /usr/local/bin/start.sh ${wrapper} jupyter notebook "$@"
|
exec /usr/local/bin/start.sh ${wrapper} ${NOTEBOOK_ARGS} jupyter notebook "$@"
|
||||||
fi
|
fi
|
||||||
|
@@ -33,7 +33,7 @@ def test_start_notebook(container, http_client, env, expected_server):
|
|||||||
), f"Not the expected command (jupyter {expected_server}) was launched"
|
), f"Not the expected command (jupyter {expected_server}) was launched"
|
||||||
# Checking warning messages
|
# Checking warning messages
|
||||||
if not env:
|
if not env:
|
||||||
msg = "WARN: Jupyter Notebook deprecation notice"
|
msg = "WARNING: Jupyter Notebook deprecation notice"
|
||||||
assert msg in logs, f"Expected warning message {msg} not printed"
|
assert msg in logs, f"Expected warning message {msg} not printed"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user