diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index c49f3d98..2e3dbdf6 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -6,4 +6,4 @@ runs: - name: Install apt dependencies and upgrade pip shell: bash -el {0} run: | - apt-get update && apt-get install -y libxrender1 + apt-get update && apt-get install -y libxrender1 libgl1-mesa-dev mesa-utils diff --git a/.github/workflows/book_stable.yml b/.github/workflows/book_stable.yml index 576d30a1..4a94eedd 100644 --- a/.github/workflows/book_stable.yml +++ b/.github/workflows/book_stable.yml @@ -20,7 +20,7 @@ jobs: env: PYVISTA_OFF_SCREEN: false - PYVISTA_JUPYTER_BACKEND: "html" + PYVISTA_JUPYTER_BACKEND: html steps: - uses: actions/checkout@v5 @@ -34,7 +34,7 @@ jobs: python3 -m pip install --no-binary=h5py .[netgen] - name: Build the book - run: jupyter-book build . -W + run: jupyter-book build . - uses: actions/upload-artifact@v4 if: always() diff --git a/.github/workflows/test_stable.yml b/.github/workflows/test_stable.yml index b0be68bb..fd4f15e3 100644 --- a/.github/workflows/test_stable.yml +++ b/.github/workflows/test_stable.yml @@ -5,19 +5,18 @@ on: workflow_call: pull_request: branches: ["release"] -env: - HDF5_MPI: "ON" - HDF5_DIR: "/usr/local/" - DISPLAY: ":99.0" - DEB_PYTHON_INSTALL_LAYOUT: deb_system - LIBGL_ALWAYS_SOFTWARE: 1 jobs: test: runs-on: ubuntu-latest container: ghcr.io/fenics/dolfinx/lab:stable env: + HDF5_MPI: "ON" + HDF5_DIR: "/usr/local/" + DEB_PYTHON_INSTALL_LAYOUT: deb_system PYVISTA_OFF_SCREEN: true + PYVISTA_JUPYTER_BACKEND: html + LIBGL_ALWAYS_SOFTWARE: 1 # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/Dockerfile b/Dockerfile index 9d966fcb..4882fe93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/jorgensd/dolfinx-tutorial:release +FROM ghcr.io/jorgensd/dolfinx-tutorial:v0.9.1 # create user with a home directory ARG NB_USER=jovyan diff --git a/chapter4/compiler_parameters.ipynb b/chapter4/compiler_parameters.ipynb index 39feeb91..760f3437 100644 --- a/chapter4/compiler_parameters.ipynb +++ b/chapter4/compiler_parameters.ipynb @@ -82,7 +82,8 @@ "id": "4", "metadata": {}, "source": [ - "We start by considering the different levels of optimization that the C compiler can use on the optimized code. A list of optimization options and explanations can be found [here](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html)" + "We start by considering the different levels of optimization that the C compiler can use on the optimized code.\n", + "A list of optimization options and explanations can be found [here](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html)" ] }, { @@ -100,7 +101,9 @@ "id": "6", "metadata": {}, "source": [ - "The next option we can choose is if we want to compile the code with `-march=native` or not. This option enables instructions for the local machine, and can give different results on different systems. More information can be found [here](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#g_t-march-and--mcpu-Feature-Modifiers)" + "The next option we can choose is if we want to compile the code with `-march=native` or not.\n", + "This option enables instructions for the local machine, and can give different results on different systems.\n", + "More information can be found [here](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#g_t-march-and--mcpu-Feature-Modifiers)" ] }, { diff --git a/chapter4/compiler_parameters.py b/chapter4/compiler_parameters.py index 2ba44ff5..97e5c33c 100644 --- a/chapter4/compiler_parameters.py +++ b/chapter4/compiler_parameters.py @@ -64,11 +64,14 @@ def compile_form(space: str, degree: int, jit_options: Dict): return end - start -# We start by considering the different levels of optimization that the C compiler can use on the optimized code. A list of optimization options and explanations can be found [here](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html) +# We start by considering the different levels of optimization that the C compiler can use on the optimized code. +# A list of optimization options and explanations can be found [here](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html) optimization_options = ["-O1", "-O2", "-O3", "-Ofast"] -# The next option we can choose is if we want to compile the code with `-march=native` or not. This option enables instructions for the local machine, and can give different results on different systems. More information can be found [here](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#g_t-march-and--mcpu-Feature-Modifiers) +# The next option we can choose is if we want to compile the code with `-march=native` or not. +# This option enables instructions for the local machine, and can give different results on different systems. +# More information can be found [here](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#g_t-march-and--mcpu-Feature-Modifiers) march_native = [True, False] diff --git a/docker/Dockerfile b/docker/Dockerfile index ff9f0c2d..2d5ef158 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -47,4 +47,8 @@ ENV PYVISTA_OFF_SCREEN="false" ENV PYVISTA_JUPYTER_BACKEND="trame" ENV LIBGL_ALWAYS_SOFTWARE=1 +ENV PYVISTA_OFF_SCREEN="false" +ENV PYVISTA_JUPYTER_BACKEND="trame" +ENV LIBGL_ALWAYS_SOFTWARE=1 + ENTRYPOINT ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser", "--allow-root"]