Skip to content

Commit e6dea3d

Browse files
authored
v0.6.0 (#95)
* Updates for JIT-options * Update various plots and other minor things * Resolve meshsize issue at the right part of the ring (x>0,y=0) on page /chapter3/em.html #111 * Repin nbconvert. Resolve Issue on chapter2/ns_code2.html #105 * Add new docker workflow for publishing images on tagging * Resolve Issue on page /chapter3/neumann_dirichlet_code.html #91 * Change jupyter backend to trame * Pin setuptools as long as we don't have new ffcx sub release
1 parent 25c1ec2 commit e6dea3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+8083
-1330
lines changed

.github/workflows/build-publish.yml

+49-23
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,54 @@ concurrency:
2727
env:
2828
# Directory that will be published on github pages
2929
PUBLISH_DIR: ./_build/html
30-
30+
HDF5_MPI: "ON"
31+
HDF5_DIR: "/usr/local/"
32+
DISPLAY: ":99.0"
33+
DEB_PYTHON_INSTALL_LAYOUT: deb_system
3134

3235
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
3336
jobs:
3437
# This workflow contains a single job called "build"
3538
test:
3639
# The type of runner that the job will run on
3740
runs-on: ubuntu-latest
38-
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
39-
41+
container: ghcr.io/fenics/dolfinx/lab:v0.6.0-r1
4042
env:
41-
HDF5_MPI: "ON"
42-
CC: mpicc
43-
HDF5_DIR: "/usr/local/"
44-
DISPLAY: ":99.0"
4543
PYVISTA_OFF_SCREEN: true
4644

4745
# Steps represent a sequence of tasks that will be executed as part of the job
4846
steps:
4947
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
5048
- uses: actions/checkout@v3
5149

50+
# Upgrade setuptools and pip
51+
# https://github.com/pypa/setuptools/issues/3269#issuecomment-1254507377
52+
- name: Install apt dependencies and upgrade pip
53+
run: |
54+
apt-get update && apt-get install -y libgl1-mesa-glx libxrender1 xvfb
55+
python3 -m pip install -U "setuptools<=65.5.1" pip pkgconfig
56+
57+
# Install `h5py`
58+
# https://github.com/hl5py/h5py/issues/2222
59+
- name: Install h5py and pip requirements
60+
run: |
61+
python3 -m pip install cython
62+
python3 -m pip install --no-build-isolation --no-binary=h5py h5py
63+
python3 -m pip install --no-cache-dir -r docker/requirements.txt --upgrade
64+
65+
5266
- name: Test complex notebooks in parallel
5367
run: |
5468
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
5569
export PETSC_ARCH=linux-gnu-complex-32
5670
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH
5771
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
58-
pip3 uninstall pyvista -y
59-
pip3 install pyvista --upgrade
6072
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
6173
cd chapter1
74+
python3 complex_mode.py
6275
mpirun -n 2 python3 complex_mode.py
6376
64-
65-
- name: Install dependencies
66-
run: pip3 install notebook nbconvert jupyter-book --upgrade
77+
6778
- name: Test notebooks in parallel
6879
run: |
6980
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
@@ -102,24 +113,39 @@ jobs:
102113
build-book:
103114
# The type of runner that the job will run on
104115
runs-on: ubuntu-latest
105-
container: ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
106-
116+
container: ghcr.io/fenics/dolfinx/lab:v0.6.0-r1
117+
107118
env:
108-
HDF5_MPI: "ON"
109-
CC: mpicc
110-
HDF5_DIR: "/usr/local/"
111-
DISPLAY: ":99.0"
119+
PYVISTA_TRAME_SERVER_PROXY_PREFIX: '/proxy/'
120+
PYVISTA_TRAME_SERVER_PROXY_ENABLED: "True"
112121
PYVISTA_OFF_SCREEN: false
113-
PYVISTA_JUPYTER_BACKEND: "static"
122+
PYVISTA_JUPYTER_BACKEND: "panel"
123+
114124

115125
# Steps represent a sequence of tasks that will be executed as part of the job
116126
steps:
117-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
127+
118128
- uses: actions/checkout@v3
119-
# Runs a single command using the runners shell
129+
130+
# Upgrade setuptools and pip
131+
# https://github.com/pypa/setuptools/issues/3269#issuecomment-1254507377
132+
- name: Install apt dependencies and upgrade pip
133+
run: |
134+
apt-get update && apt-get install -y libgl1-mesa-glx libxrender1 xvfb
135+
python3 -m pip install -U "setuptools<=65.5.1" pip pkgconfig
136+
137+
# Install `h5py`
138+
# https://github.com/hl5py/h5py/issues/2222
139+
- name: Install h5py and pip requirements
140+
run: |
141+
python3 -m pip install cython
142+
python3 -m pip install --no-build-isolation --no-binary=h5py h5py
143+
python3 -m pip install --no-cache-dir -r docker/requirements.txt jupyter-book --upgrade
144+
145+
120146
- name: Build the book
121147
run:
122-
jupyter-book build -W .
148+
jupyter-book build .
123149

124150
- name: Upload book
125151
uses: actions/upload-pages-artifact@v1
@@ -147,4 +173,4 @@ jobs:
147173

148174
- name: Deploy to GitHub Pages
149175
id: deployment
150-
uses: actions/deploy-pages@v1
176+
uses: actions/deploy-pages@v1

.github/workflows/nightly.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,31 @@ jobs:
2727
env:
2828
HDF5_MPI: "ON"
2929
PYVISTA_OFF_SCREEN: true
30-
30+
DISPLAY: ":99.0"
31+
PYVISTA_JUPYTER_BACKEND: panel
32+
3133
# Steps represent a sequence of tasks that will be executed as part of the job
3234
steps:
3335
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
34-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
3537
# Workaround for scheduling to work
3638
with:
3739
ref: dokken/release
3840

39-
- name: Install dependencies
41+
# Upgrade setuptools and pip
42+
# https://github.com/pypa/setuptools/issues/3269#issuecomment-1254507377
43+
- name: Install apt dependencies and upgrade pip
44+
run: |
45+
apt-get update && apt-get install -y libgl1-mesa-glx libxrender1 xvfb
46+
python3 -m pip install -U "setuptools<=65.5.1" pip pkgconfig
47+
48+
# Install `h5py`
49+
# https://github.com/hl5py/h5py/issues/2222
50+
- name: Install h5py and pip requirements
4051
run: |
41-
pip3 install --upgrade pip setuptools
42-
CC=mpicc HDF_MPI="ON" HDF5_DIR="/usr/local/" pip3 install --no-cache-dir -r docker/requirements.txt
43-
pip3 uninstall pyvista -y
44-
pip3 install pyvista --upgrade --user
45-
apt-get -qq update
46-
apt-get install -y libgl1-mesa-dev xvfb nodejs
52+
python3 -m pip install cython
53+
python3 -m pip install --no-build-isolation --no-binary=h5py h5py
54+
python3 -m pip install --no-cache-dir -r docker/requirements.txt --upgrade
4755
4856
- name: Test complex notebooks in parallel
4957
run: |
@@ -52,6 +60,7 @@ jobs:
5260
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH
5361
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
5462
cd chapter1
63+
python3 complex_mode.py
5564
mpirun -n 2 python3 complex_mode.py
5665
5766
- name: Test real notebooks in parallel
@@ -84,4 +93,4 @@ jobs:
8493
8594
- name: Test building the book
8695
run:
87-
PYVISTA_JUPYTER_BACKEND=static PYVISTA_OFF_SCREEN=false jupyter-book build -W .
96+
PYVISTA_OFF_SCREEN=false jupyter-book build -W .

.github/workflows/publish_docker.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
push:
3+
branches:
4+
- "!*"
5+
tags:
6+
- "v*"
7+
8+
workflow_dispatch:
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
build-and-push-image:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v2
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
31+
- name: Log in to the Container registry
32+
uses: docker/login-action@v2
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@v4
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v3
46+
with:
47+
context: .
48+
push: true
49+
file: docker/Dockerfile
50+
platforms: linux/amd64,linux/arm64
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.5.1
1+
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.6.0
22

33
# create user with a home directory
44
ARG NB_USER

0 commit comments

Comments
 (0)