Skip to content

Commit

Permalink
Bump pyvista and dolfinx to v0.7.2 (#159)
Browse files Browse the repository at this point in the history
* Bump pyvista and dolfinx to v0.7.2

* remove -r

* Add further pyvista deps

* Bump versions
  • Loading branch information
jorgensd authored Dec 6, 2023
1 parent 8d602cd commit f7c20ee
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 46 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/book_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ env:
jobs:
build-book:
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/lab:v0.7.1
container: ghcr.io/fenics/dolfinx/lab:v0.7.2

env:
PYVISTA_TRAME_SERVER_PROXY_PREFIX: "/proxy/"
PYVISTA_TRAME_SERVER_PROXY_ENABLED: "True"
PYVISTA_OFF_SCREEN: false
PYVISTA_JUPYTER_BACKEND: "panel"
PYVISTA_JUPYTER_BACKEND: "html"

steps:
- uses: actions/checkout@v4
Expand All @@ -30,7 +30,7 @@ jobs:
uses: ./.github/actions/install-dependencies

- name: Install book deps
run: python3 -m pip install -r docker/requirements.txt
run: python3 -m pip install --no-binary=h5py .

- name: Build the book
run: jupyter-book build . -W
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4

- name: Download docs artifact
uses: actions/download-artifact@v3
Expand All @@ -53,10 +53,10 @@ jobs:
path: "./public"

- name: Upload page artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v2
with:
path: "./public"

- name: Deploy coverage report to GH Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v3
2 changes: 1 addition & 1 deletion .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./docker
context: .
push: true
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
test-nightly:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/lab:v0.7.1
container: ghcr.io/fenics/dolfinx/lab:nightly

env:
HDF5_MPI: "ON"
Expand All @@ -42,7 +42,7 @@ jobs:
uses: ./.github/actions/install-dependencies

- name: Install requirements
run: python3 -m pip install --no-cache-dir -r docker/requirements.txt --upgrade
run: python3 -m pip install --no-cache-dir --no-binary=h5py . --upgrade

- name: Test complex notebooks in parallel
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/lab:v0.7.1
container: ghcr.io/fenics/dolfinx/lab:v0.7.2
env:
PYVISTA_OFF_SCREEN: true

Expand All @@ -32,7 +32,7 @@ jobs:

- name: Install additional deps
run: |
python3 -m pip install -r docker/requirements.txt
python3 -m pip install --no-binary=h5py .
- name: Test complex notebooks in parallel
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ _build
**/.cache
*.png
*.pvtu
*.msh
*.msh
*.bp
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.7.2
- Change pyvista backend to `html`, using Pyvista main branch
- Using DOLFINx v0.7.2 https://github.com/FEniCS/dolfinx/releases/tag/v0.7.2 as base

## v0.7.1
- No API changes, release due to various bug-fixes from the 0.7.0 release, see:
https://github.com/FEniCS/dolfinx/releases/tag/v0.7.1 for more information
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.7.1
FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.7.2

# create user with a home directory
ARG NB_USER=jovyan
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ 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.

## Dependencies
It is adviced to use a pre-installed version of DOLFINx, for instance through conda or docker. Remaining dependencies can be installed with
```bash
python3 -m pip install --no-binary=h5py -e .
```

# Docker images
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)
Additional requirements on top of the `dolfinx/lab:nightly` images can be found at [Dockerfile](docker/Dockerfile) and [pyproject.toml](./pyproject.toml)

##
An image building DOLFINx, Basix, UFL and FFCx from source can be built using:
```bash
cd docker
docker build -f LocalDockerfile -t local_lab_env .
docker build -f ./docker/Dockerfile -t local_lab_env .
```
and run
from the root of this repository, and run
```bash
docker run --rm -ti -v $(pwd):/root/shared -w /root/shared --init -p 8888:8888 local_lab_env
```
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ sphinx:

# To avoid warning about default changing due to
# https://github.com/pydata/pydata-sphinx-theme/issues/1492
html_theme_options:
navigation_with_keys: false
# html_theme_options:
# navigation_with_keys: false
parse:
myst_enable_extensions:
- "amsmath"
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Execute from root of repo as: docker buildx build --platform=linux/arm64,linux/amd64 -f docker/Dockerfile ./docker/ --progress=plain

FROM ghcr.io/fenics/dolfinx/lab:v0.7.1
FROM ghcr.io/fenics/dolfinx/lab:v0.7.2
ARG TARGETPLATFORM


Expand Down Expand Up @@ -29,8 +29,8 @@ RUN echo ${TARGETPLATFORM}
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then python3 -m pip install "https://github.com/finsberg/vtk-aarch64/releases/download/vtk-9.2.6-cp310/vtk-9.2.6.dev0-cp310-cp310-linux_aarch64.whl"; fi
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then python3 -m pip install vtk; fi

ADD requirements.txt /tmp/requirements.txt
RUN python3 -m pip install --no-cache-dir -v -r requirements.txt
ADD pyproject.toml /tmp/pyproject.toml
RUN python3 -m pip install --no-cache-dir --no-binary=h5py -v pyproject.toml
RUN python3 -m pip cache purge
RUN jupyter lab build
ENTRYPOINT ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser", "--allow-root"]
22 changes: 0 additions & 22 deletions docker/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions fem.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ The tutorial uses several dependencies for meshing, plotting and timings. A comp
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 ghcr.io/jorgensd/dolfinx-tutorial:v0.7.1
docker run --init -p 8888:8888 -v "$(pwd)":/root/shared ghcr.io/jorgensd/dolfinx-tutorial:v0.7.2
```

This image can also be used as a normal docker container by adding:

```bash
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:v0.7.1
docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:v0.7.2
```

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 tutorial. The notebook can in turn be used with a Python kernel which has DOLFINx.
Expand All @@ -58,7 +58,7 @@ The [Dockerfile](https://github.com/FEniCS/dolfinx/blob/main/docker/Dockerfile)
provides a definitive build recipe. As the DOLFINx docker images are hosted at Docker-hub, one can directly access the image:

```
docker run dolfinx/dolfinx:v0.7.1
docker run dolfinx/dolfinx:v0.7.2
```

There are several ways of customizing a docker container, such as mounting volumes/sharing folder, setting a working directory, sharing graphical interfaces etc. See `docker run --help` for an extensive list.
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools>=64.4.0", "wheel", "pip>=22.3"]
build-backend = "setuptools.build_meta"

[project]
name = "DOLFINx_Tutorial"
version = "0.7.2"
dependencies = ["jupyter-book",
# Pin docutils due to https://github.com/executablebooks/jupyter-book/issues/1970#issuecomment-1466051277
"docutils==0.17.1",
"meshio",
"h5py",
"seaborn",
"pandas",
"tqdm",
"pyvista[all]@git+https://github.com/pyvista/pyvista",
"fenics-dolfinx>=0.7.0"
]

[project.optional-dependencies]
dev = [
"pdbpp",
"ipython",
]

[tool.setuptools]
packages = []

0 comments on commit f7c20ee

Please sign in to comment.