summaryrefslogtreecommitdiff
path: root/scripts/start-notebook.sh
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-02-28 14:46:07 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-02-28 14:46:07 -0500
commit8c37ac76900b06794d99e2a7124af21b8093d7fe (patch)
tree6acd8189d73e78f4cf16b9390f88135472fb6e00 /scripts/start-notebook.sh
parentc4ec0592116720e53dfb8b2e327a2bf223701105 (diff)
downloaddocker-pipeline-nb-8c37ac76900b06794d99e2a7124af21b8093d7fe.tar.gz
Tack Jupyter scripts on top
Diffstat (limited to 'scripts/start-notebook.sh')
-rwxr-xr-xscripts/start-notebook.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/start-notebook.sh b/scripts/start-notebook.sh
new file mode 100755
index 0000000..b38c738
--- /dev/null
+++ b/scripts/start-notebook.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
+set -e
+
+if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
+ # launched by JupyterHub, use single-user entrypoint
+ exec /usr/local/bin/start-singleuser.sh "$@"
+elif [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
+ . /usr/local/bin/start.sh jupyter lab "$@"
+else
+ . /usr/local/bin/start.sh jupyter notebook "$@"
+fi