Jupyter notebook s2i builder image.
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'
TBD
To test that everything works properly, run make test