This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from akchinSTC/v3.12.0
Refactor for use with new notebook launcher
- Loading branch information
Showing
10 changed files
with
100 additions
and
1,940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM quay.io/thoth-station/s2i-minimal-py38-notebook:v0.5.0 | ||
|
||
ENV JUPYTER_ENABLE_LAB=true | ||
ENV CRIO_RUNTIME=true | ||
|
||
WORKDIR /opt/app-root/bin | ||
|
||
COPY setup-elyra.sh start-notebook.sh requirements.txt ./ | ||
|
||
RUN python3 -m pip install -r requirements.txt && \ | ||
rm -f requirements.txt | ||
|
||
RUN chmod -R g+w /opt/app-root/lib/python3.8/site-packages && \ | ||
fix-permissions /opt/app-root -P | ||
|
||
WORKDIR /opt/app-root/bin |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Notebook requirements | ||
elyra[kfp-tekton]==3.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
set -eo pipefail | ||
|
||
if [[ ! -z "${JUPYTER_ENABLE_KERNELGATEWAY}" ]]; then | ||
exec /opt/app-root/bin/start-kernelgateway.sh "$@" | ||
fi | ||
|
||
if [ x"$JUPYTER_MASTER_FILES" != x"" ]; then | ||
if [ x"$JUPYTER_WORKSPACE_NAME" != x"" ]; then | ||
JUPYTER_WORKSPACE_PATH=/opt/app-root/src/$JUPYTER_WORKSPACE_NAME | ||
setup-volume.sh $JUPYTER_MASTER_FILES $JUPYTER_WORKSPACE_PATH | ||
fi | ||
fi | ||
|
||
JUPYTER_PROGRAM_ARGS="$JUPYTER_PROGRAM_ARGS $NOTEBOOK_ARGS" | ||
|
||
JUPYTER_NOTEBOOK_INTERFACE=${JUPYTER_NOTEBOOK_INTERFACE:-classic} | ||
|
||
if [ x"$JUPYTER_ENABLE_LAB" = x"" ]; then | ||
if [ x"$JUPYTER_NOTEBOOK_INTERFACE" = x"lab" ]; then | ||
JUPYTER_ENABLE_LAB=true | ||
fi | ||
fi | ||
|
||
JUPYTER_ENABLE_LAB=`echo "$JUPYTER_ENABLE_LAB" | tr '[A-Z]' '[a-z]'` | ||
|
||
if [[ "$JUPYTER_ENABLE_LAB" =~ ^(true|yes|y|1)$ ]]; then | ||
JUPYTER_PROGRAM_ARGS="$JUPYTER_PROGRAM_ARGS --NotebookApp.default_url=/lab" | ||
else | ||
if [ x"$JUPYTER_WORKSPACE_NAME" != x"" ]; then | ||
JUPYTER_PROGRAM_ARGS="$JUPYTER_PROGRAM_ARGS --NotebookApp.default_url=/tree/$JUPYTER_WORKSPACE_NAME" | ||
fi | ||
fi | ||
|
||
if [[ "$JUPYTER_ENABLE_LAB" =~ ^(true|yes|y|1)$ ]]; then | ||
JUPYTER_PROGRAM_ARGS="$JUPYTER_PROGRAM_ARGS --config=/opt/app-root/etc/jupyter_server_config.py" | ||
else | ||
JUPYTER_PROGRAM_ARGS="$JUPYTER_PROGRAM_ARGS --config=/opt/app-root/etc/jupyter_notebook_config.py" | ||
fi | ||
|
||
if [[ "$JUPYTER_PROGRAM_ARGS $@" != *"--ip="* ]]; then | ||
JUPYTER_PROGRAM_ARGS="--ip=0.0.0.0 $JUPYTER_PROGRAM_ARGS" | ||
fi | ||
|
||
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then | ||
if [[ "$JUPYTER_ENABLE_LAB" =~ ^(true|yes|y|1)$ ]]; then | ||
JUPYTER_PROGRAM="jupyter labhub" | ||
else | ||
JUPYTER_PROGRAM="jupyterhub-singleuser" | ||
fi | ||
else | ||
if [[ "$JUPYTER_ENABLE_LAB" =~ ^(true|yes|y|1)$ ]]; then | ||
JUPYTER_PROGRAM="jupyter lab" | ||
else | ||
JUPYTER_PROGRAM="jupyter notebook" | ||
fi | ||
fi | ||
|
||
. /opt/app-root/bin/setup-environ.sh | ||
|
||
if [ -f /opt/app-root/src/.jupyter/jupyter_notebook_config.sh ]; then | ||
. /opt/app-root/src/.jupyter/jupyter_notebook_config.sh | ||
fi | ||
|
||
. /opt/app-root/bin/setup-elyra.sh | ||
|
||
exec /opt/app-root/bin/start.sh $JUPYTER_PROGRAM $JUPYTER_PROGRAM_ARGS "$@" |