/jupyter-notebook-s2i

Jupyter notebook S2I builder image.

Primary LanguageShellMIT LicenseMIT

jupyter-notebook-s2i

Docker Repository on Quay

Jupyter notebook s2i builder image.

Usage

IMAGE_NAME="jupyter-notebook-s2i"

s2i build \
    --env JUPYTER_NOTEBOOK_PATH='test-notebook.ipynb' \
    'test/s2i/test-app/' quay.io/cermakm/jupyter-notebook-s2i ${IMAGE_NAME}

NOTE: Path to the notebook is relative to the $APP_ROOT directive and is resolved during container runtime.

docker run will then execute the notebook inside the container:

CONTAINER_NAME="notebook_container"
docker run -it \
    --env JUPYTER_NOTEBOOK_PATH='test-notebook.ipynb' \
    --name "$CONTAINER_NAME"
    ${IMAGE_NAME}:latest

To explore the output notebook, you can copy it out of the container:

docker cp "$CONTAINER_NAME":'/opt/app-root/src/output.ipynb' /tmp/output.ipynb

cat /tmp/output.ipynb | jq -r '.metadata.papermill'

Parametrization

TBD

Test

To test that everything works properly, run make test