|
36 | 36 | # Extra arguments to pass to PETSc's `configure` script |
37 | 37 | # |
38 | 38 | # Example usage for a specific firedrake release with complex scalars: |
39 | | -# $ docker build \ |
| 39 | +# $ docker build . \ |
40 | 40 | # --file=Dockerfile.vanilla \ |
41 | 41 | # --tag=firedrake:2025.4.2-complex \ |
42 | 42 | # --build-arg ARCH=complex \ |
43 | 43 | # --build-arg BRANCH=2025.4.2 |
44 | 44 | # |
45 | 45 | # Example usage for building from firedrake main with real scalars, ml installed with PETSc, and valgrind installed with apt: |
46 | | -# $ docker build \ |
| 46 | +# $ docker build . \ |
47 | 47 | # --file=Dockerfile.vanilla \ |
48 | 48 | # --tag=firedrake:main-latest \ |
49 | 49 | # --build-arg ARCH=default \ |
@@ -136,28 +136,28 @@ ENV MPICC=mpicc |
136 | 136 | ENV CFLAGS="-O3 -mtune=generic" CPPFLAGS="-O3 -mtune=generic" |
137 | 137 |
|
138 | 138 | # Install Firedrake |
139 | | -# - petsc4py and slepc4py are installed from source in PETSc repo. |
140 | | -# - slepc4py is installed without build isolation so it links against |
141 | | -# the correct petsc4py version. |
| 139 | +# - If installing 'main' then petsc4py and slepc4py are installed from source, |
| 140 | +# otherwise they are installed from PyPI. This mirrors our CI. |
142 | 141 | # - Firedrake main branch requires main/master branch of some upstream |
143 | 142 | # packages. These are installed in editable mode. |
144 | 143 | # The order these are installed is important, e.g. FIAT must be installed |
145 | 144 | # before UFL otherwise `pip install fiat` will reinstall pypi ufl. |
146 | 145 |
|
147 | | -# Fix for petsc4py+slepc4py build to be removed after #4873 is resolved. |
148 | | -RUN echo 'setuptools<81' > /opt/constraints.txt |
149 | | -ENV PIP_CONSTRAINT=/opt/constraints.txt |
150 | | - |
151 | 146 | RUN git clone --branch ${BRANCH} \ |
152 | 147 | https://github.com/firedrakeproject/firedrake.git /opt/firedrake \ |
153 | | - && pip cache purge \ |
154 | | - && pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \ |
155 | | - && pip install --verbose -r /opt/firedrake/requirements-build.txt \ |
156 | | - && pip install --verbose --no-build-isolation \ |
157 | | - ${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \ |
158 | | - && pip install --verbose --no-binary h5py --no-build-isolation \ |
159 | | - --editable '/opt/firedrake[docker]' || exit; \ |
160 | | - if [ ${BRANCH} == "main" ]; then \ |
| 148 | + && pip cache purge || exit; \ |
| 149 | + if [ ${BRANCH} == "main" ]; then \ |
| 150 | + pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \ |
| 151 | + && pip install --verbose -r /opt/firedrake/requirements-build.txt \ |
| 152 | + && pip install --verbose --no-build-isolation \ |
| 153 | + ${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \ |
| 154 | + && pip install --verbose --no-binary h5py --no-build-isolation \ |
| 155 | + --editable '/opt/firedrake[docker]' || exit; \ |
| 156 | + else \ |
| 157 | + pip install --verbose --no-binary h5py \ |
| 158 | + --editable '/opt/firedrake[docker]' || exit; \ |
| 159 | + fi; \ |
| 160 | + if [ ${BRANCH} == "main" ]; then \ |
161 | 161 | for pkg in \ |
162 | 162 | "git+https://github.com/dolfin-adjoint/pyadjoint.git#egg=pyadjoint-ad" \ |
163 | 163 | "git+https://github.com/firedrakeproject/fiat.git#egg=firedrake-fiat" \ |
|
0 commit comments