Skip to content

Commit 8dd693d

Browse files
ADD: Container zoomy_firedrake_standalone
1 parent 6122fbe commit 8dd693d

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Use firedrake vanilla image (default architecture, main branch)
2+
FROM firedrakeproject/firedrake-vanilla-default:latest
3+
4+
# Set environment variables
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV TZ=Europe/London
7+
8+
# Install additional build tools and dependencies for PETSc
9+
RUN apt-get update && apt-get install -y \
10+
build-essential \
11+
gfortran \
12+
cmake \
13+
git \
14+
sudo \
15+
libblas-dev \
16+
liblapack-dev \
17+
libboost-dev \
18+
libopenblas-dev \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# Rebuild PETSc with mesh adaptivity frameworks enabled
22+
RUN cd /opt/petsc && \
23+
make clean && rm -rf arch-* && \
24+
./configure \
25+
--download-ptscotch \
26+
--with-make-np=8 \
27+
--download-hwloc \
28+
--download-hdf5 \
29+
--with-hdf5=1 \
30+
--with-hdf5-fortran-bindings=0 \
31+
--download-netlib-lapack \
32+
--with-netlib-lapack-c-bindings \
33+
--download-mumps \
34+
--download-scalapack \
35+
--download-parmetis \
36+
--download-superlu_dist \
37+
--download-pastix \
38+
--download-metis \
39+
--download-mmg \
40+
--download-parmmg \
41+
--download-pragmatic \
42+
--download-eigen \
43+
--download-slepc \
44+
--with-shared-libraries \
45+
PETSC_ARCH=arch-firedrake-default && \
46+
make PETSC_DIR=/opt/petsc PETSC_ARCH=arch-firedrake-default all
47+
48+
# Re-install Python PETSc bindings
49+
RUN pip install --no-cache-dir --force-reinstall \
50+
/opt/petsc/src/binding/petsc4py
51+
52+
# --- Install Python dependencies ---
53+
RUN python3 -m pip install --no-cache-dir \
54+
jupyterlab \
55+
notebook \
56+
ipywidgets \
57+
matplotlib \
58+
pandas
59+
60+
61+
# Clean up
62+
RUN rm -rf /var/lib/apt/lists/*
63+
64+
# Adjust these paths to match your layout on the host
65+
COPY library /tmp/library
66+
67+
# Install into the zoomy conda environment
68+
RUN python -m pip install /tmp/library/zoomy_core && \
69+
python -m pip install /tmp/library/zoomy_tests && \
70+
python -m pip install /tmp/library/firedrake_animate && \
71+
python -m pip install /tmp/library/zoomy_firedrake && \
72+
rm -rf /tmp/library
73+
74+
# ------------------------------------------------------------
75+
# Default entrypoint
76+
# ------------------------------------------------------------
77+
CMD ["/bin/bash"]
78+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1

0 commit comments

Comments
 (0)