Skip to content

Commit

Permalink
Update dockerfile to include conversion from python file to ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed May 2, 2024
1 parent 987f015 commit 69525c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Expand Down

0 comments on commit 69525c7

Please sign in to comment.