Skip to content

Bump to dolfinx 0.5.1 #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 35 additions & 12 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This is a basic workflow to help you get started with Actions
name: Build and publish
name: Test, build and publish

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [dokken/jupyterbook]
branches: ["*"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,10 +16,10 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-publish:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: dokken92/dolfinx_custom:v0.5.0
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1

env:
HDF5_MPI: "ON"
Expand Down Expand Up @@ -74,13 +73,37 @@ jobs:
mpirun -n 3 python3 convergence.py
mpirun -n 3 python3 compiler_parameters.py

build-book:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1

env:
HDF5_MPI: "ON"
CC: mpicc
HDF5_DIR: "/usr/local/"
DISPLAY: ":99.0"
PYVISTA_OFF_SCREEN: false
PYVISTA_JUPYTER_BACKEND: "static"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Build the book
run: |
PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build -W .
run:
jupyter-book build -W .

publish:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/dokken/jupyter-book'
needs: [build-book]
steps:
# Push book to HTML to github pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
10 changes: 5 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This is a basic workflow to help you get started with Actions
name: Test against DOLFINx nightly build
name: Test release branch against DOLFINx nightly build

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [dokken/jupyterbook]
pull_request:
branches:
- dokken/jupyterbook
branches: [dokken/release]
# pull_request:
# branches:
# - dokken/jupyterbook

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dokken92/dolfinx_custom:v0.5.0
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1

# create user with a home directory
ARG NB_USER
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Any code added to the tutorial should work in parallel.
Alternatively, if you want to add a separate chapter, a Jupyter notebook can be added to a pull request, without integrating it into the tutorial. If so, the notebook will be reviewed and modified to be included in the tutorial.

# Docker images
Docker images for this tutorial can be found at [Docker hub](https://hub.docker.com/repository/docker/dokken92/dolfinx_custom)
Docker images for this tutorial can be found in the [packages tab](https://github.com/jorgensd/dolfinx-tutorial/pkgs/container/dolfinx-tutorial)

Additional requirements on top of the `dolfinx/lab:nightly` images can be found at [Dockerfile](docker/Dockerfile) and [requirements.txt](docker/requirements.txt)

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dolfinx/lab:v0.5.0
FROM dolfinx/lab:v0.5.1

WORKDIR /tmp/

Expand Down
6 changes: 3 additions & 3 deletions fem.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Docker is a software that uses *containers* to supply software across different
All notebooks can be converted to python files using [nbconvert](https://nbconvert.readthedocs.io/en/latest/).

### Tutorial compatible docker images
The tutorial uses several dependencies for meshing, plotting and timings. A compatible `JupyterLab` image is available at [DockerHub/dokken92/dolfinx_custom:v0.5.0](https://hub.docker.com/r/dokken92/dolfinx_custom/tags)
The tutorial uses several dependencies for meshing, plotting and timings. A compatible `JupyterLab` image is available in the [Github Packages](https://github.com/jorgensd/dolfinx-tutorial/pkgs/container/dolfinx-tutorial))

To use the notebooks in this tutorial with DOLFINx on your own computer, you should use the docker image using the following command
```bash
docker run --init -p 8888:8888 -v "$(pwd)":/root/shared dokken92/dolfinx_custom:v0.5.0
docker run --init -p 8888:8888 -v "$(pwd)":/root/shared ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
```
This image can also be used as a normal docker container by adding:
```bash
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" dokken92/dolfinx_custom:v0.5.0
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
```

The tutorials can also be exported as a notebook or PDF by clicking the ![Download](save.png)-symbol in the top right corner of the relevant tutorialThe notebook can in turn be used with a Python kernel which has DOLFINx.
Expand Down