Skip to content

Commit

Permalink
Remove unnecessary files inside the build layer (#3916)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddundo authored Dec 11, 2024
1 parent 6a20368 commit 7b2b81a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docker/Dockerfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7b2b81a

Please sign in to comment.