From 7b2b81a80659f4ba3d3de4840c756848f57841ba Mon Sep 17 00:00:00 2001 From: Davor Dundovic <33790330+ddundo@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:37:45 +0100 Subject: [PATCH] Remove unnecessary files inside the build layer (#3916) --- docker/Dockerfile.env | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index ac15aa7e2f..d40a613f85 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -67,9 +67,14 @@ RUN bash -c 'cd petsc; \ --download-suitesparse \ --download-superlu_dist \ PETSC_ARCH=packages; \ - mv packages/include/petscconf.h packages/include/old_petscconf.nope;' + mv packages/include/petscconf.h packages/include/old_petscconf.nope; \ + rm -rf /home/firedrake/petsc/**/externalpackages; \ + rm -rf /home/firedrake/petsc/src/docs; \ + rm -f /home/firedrake/petsc/src/**/tutorials/output/*; \ + rm -f /home/firedrake/petsc/src/**/tests/output/*' # Don't run make here, we only want MPICH and HWLOC # It is also necessary to move `petscconf.h` so packages isn't treated like a working PETSc +# Cleaned up unnecessary files # Build default Firedrake PETSc RUN bash -c 'export PACKAGES=/home/firedrake/petsc/packages; \ @@ -149,12 +154,6 @@ RUN bash -c 'export PETSC_DIR=/home/firedrake/petsc; \ ./configure; \ make SLEPC_DIR=/home/firedrake/slepc PETSC_DIR=/home/firedrake/petsc PETSC_ARCH=complex;' -# Clean up unnecessary files -RUN rm -rf /home/firedrake/petsc/**/externalpackages \ - && rm -rf /home/firedrake/petsc/src/docs \ - && rm -f /home/firedrake/petsc/src/**/tutorials/output/* \ - && rm -f /home/firedrake/petsc/src/**/tests/output/* - # Set some useful environment variables ENV PETSC_DIR /home/firedrake/petsc ENV SLEPC_DIR /home/firedrake/slepc