docker/jupyter/build/base/start-notebook.sh

22 lines
587 B
Bash
Raw Normal View History

2022-10-01 17:30:14 -07:00
#!/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=""
fi
2022-10-01 19:10:15 -07:00
if [ ! -f /home/${NB_USER}/.jupyter/jupyter_notebook_config.py ]; then
jupyter notebook --generate-config
fi
exec /usr/local/bin/start.sh ${wrapper} jupyter lab ${NOTEBOOK_ARGS} "$@"