diff --git a/Dockerfile b/Dockerfile index 57e8b89..f60ac36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use github pages for docker image -FROM ghcr.io/scientificcomputing/example-paper-fenics:v0.3.0 +FROM ghcr.io/scientificcomputing/example-paper-fenics:v0.4.0 # Create user with a home directory ARG NB_USER @@ -11,6 +11,11 @@ ENV HOME /home/${NB_USER} WORKDIR ${HOME} COPY . ${HOME} +# Convert demo.py into demo.ipynb +RUN python3 -m pip install jupytext jupyter +RUN python3 -m ipykernel install --name=python3 --user +RUN python3 -m jupytext --to notebook --execute --output ./code/demo.ipynb ./code/demo.py + # Change ownership of home directory USER root RUN chown -R ${NB_UID} ${HOME}