mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-10 03:23:00 +00:00
25 lines
852 B
Bash
Executable File
25 lines
852 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Jupyter Development Team.
|
|
# Distributed under the terms of the Modified BSD License.
|
|
|
|
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 "${JUPYTER_ENABLE_LAB}" ]]; then
|
|
# shellcheck disable=SC1091,SC2086
|
|
exec /usr/local/bin/start.sh ${wrapper} jupyter lab ${NOTEBOOK_ARGS} "$@"
|
|
else
|
|
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} jupyter notebook ${NOTEBOOK_ARGS} "$@"
|
|
fi
|