22# start by building the basic container
33# -----------------------------------------------------------------------------
44FROM ubuntu:22.04
5- MAINTAINER Steven Smith <smith84@llnl.gov>
5+ LABEL org.opencontainers.image.authors= " Steven Smith <smith84@llnl.gov>"
66
77# Non interactive mode
8- ENV DEBIAN_FRONTEND noninteractive
8+ ENV DEBIAN_FRONTEND= noninteractive
99
1010RUN apt-get update && \
1111 ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
@@ -38,9 +38,9 @@ RUN mkdir -p /home/parflow
3838# -----------------------------------------------------------------------------
3939# Set environment vars
4040# -----------------------------------------------------------------------------
41- ENV PARFLOW_DIR /usr/opt/parflow
42- ENV PARFLOW_DEP_DIR /usr/opt/parflow
43- ENV PATH $PATH:$PARFLOW_DIR/bin
41+ ENV PARFLOW_DIR= /usr/opt/parflow
42+ ENV PARFLOW_DEP_DIR= /usr/opt/parflow
43+ ENV PATH= $PATH:$PARFLOW_DIR/bin
4444
4545# -----------------------------------------------------------------------------
4646# Build libraries
@@ -52,7 +52,7 @@ ENV PATH $PATH:$PARFLOW_DIR/bin
5252# https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.bz2
5353#
5454# WORKDIR /home/parflow
55- # RUN wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/src/hdf5-1.8.21.tar.gz && \
55+ # RUN wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/src/hdf5-1.8.21.tar.gz && \
5656# tar -xf hdf5-1.8.21.tar.gz && \
5757# cd hdf5-1.8.21 && \
5858# CC=mpicc ./configure \
@@ -64,12 +64,13 @@ ENV PATH $PATH:$PARFLOW_DIR/bin
6464
6565#
6666# NetCDF
67- #
67+ #
6868WORKDIR /home/parflow
69- run wget -q https://github.com/Unidata/netcdf-c/archive/v4.9.0.tar.gz && \
69+ RUN wget -q https://github.com/Unidata/netcdf-c/archive/v4.9.0.tar.gz && \
7070 tar -xf v4.9.0.tar.gz && \
7171 cd netcdf-c-4.9.0 && \
72- CC=mpicc CPPFLAGS=-I/usr/include/hdf5/openmpi LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi ./configure --prefix=${PARFLOW_DIR} && \
72+ arch=$(dpkg-architecture -qDEB_HOST_MULTIARCH) && \
73+ CC=mpicc CPPFLAGS=-I/usr/include/hdf5/openmpi LDFLAGS=-L/usr/lib/$arch/hdf5/openmpi ./configure --prefix=${PARFLOW_DIR} && \
7374 make && \
7475 make install && \
7576 cd .. && \
@@ -79,7 +80,7 @@ run wget -q https://github.com/Unidata/netcdf-c/archive/v4.9.0.tar.gz && \
7980# NetCDF Fortran
8081#
8182WORKDIR /home/parflow
82- run wget -q https://github.com/Unidata/netcdf-fortran/archive/v4.5.4.tar.gz && \
83+ RUN wget -q https://github.com/Unidata/netcdf-fortran/archive/v4.5.4.tar.gz && \
8384 tar -xf v4.5.4.tar.gz && \
8485 cd netcdf-fortran-4.5.4 && \
8586 CC=mpicc FC=mpifort CPPFLAGS=-I${PARFLOW_DIR}/include LDFLAGS=-L${PARFLOW_DIR}/lib ./configure --prefix=${PARFLOW_DIR} && \
@@ -92,41 +93,42 @@ run wget -q https://github.com/Unidata/netcdf-fortran/archive/v4.5.4.tar.gz && \
9293# SILO
9394#
9495WORKDIR /home/parflow
95- RUN wget -q https://github.com/LLNL/Silo/archive/refs/tags/4.10.2 .tar.gz && \
96- tar -xf 4.10.2 .tar.gz && \
97- cd Silo-4.10.2 && \
98- ./configure --prefix=$PARFLOW_DIR -- disable-silex --disable-hzip --disable-fpzip && \
96+ RUN wget -q https://github.com/LLNL/Silo/archive/refs/tags/4.12.0 .tar.gz && \
97+ tar -xf 4.12.0 .tar.gz && \
98+ cd Silo-4.12.0 && \
99+ ./configure --disable-silex --disable-hzip --disable-fpzip --enable-shared=yes --prefix=$PARFLOW_DIR && \
99100 make install && \
100101 cd .. && \
101- rm -fr Silo-4.10.2 4.10.2 .tar.gz
102+ rm -fr Silo-4.12.0 4.12.0 .tar.gz
102103
103104#
104105# Hypre
105106#
106107WORKDIR /home/parflow
107- RUN wget -q https://github.com/hypre-space/hypre/archive/v2.26 .0.tar.gz && \
108- tar xf v2.26 .0.tar.gz && \
109- cd hypre-2.26 .0/src && \
108+ RUN wget -q https://github.com/hypre-space/hypre/archive/v2.33 .0.tar.gz && \
109+ tar xf v2.33 .0.tar.gz && \
110+ cd hypre-2.33 .0/src && \
110111 ./configure --prefix=$PARFLOW_DIR && \
111112 make install && \
112113 cd ../.. && \
113- rm -fr hypre-2.18.2 v2.18.2 .tar.gz
114+ rm -fr hypre-2.33.0 v2.33.0 .tar.gz
114115
115116# -----------------------------------------------------------------------------
116117# Parflow configure and build
117118# -----------------------------------------------------------------------------
118119
119- ENV PARFLOW_MPIEXEC_EXTRA_FLAGS "--mca mpi_yield_when_idle 1 --oversubscribe --allow-run-as-root"
120+ ENV PARFLOW_MPIEXEC_EXTRA_FLAGS= "--mca mpi_yield_when_idle 1 --oversubscribe --allow-run-as-root"
120121
121122# Disable HWLOC warnings from showing up, confusing messages, this has been fixed in later OpenMPI versions
122- ENV HWLOC_HIDE_ERRORS "2"
123+ ENV HWLOC_HIDE_ERRORS= "2"
123124
124125WORKDIR /home/parflow
125126
126127RUN git clone -b master --single-branch https://github.com/parflow/parflow.git parflow
127128
128129RUN mkdir -p build && \
129130 cd build && \
131+ arch=$(dpkg-architecture -qDEB_HOST_MULTIARCH) && \
130132 cmake ../parflow \
131133 -DPARFLOW_AMPS_LAYER=mpi1 \
132134 -DPARFLOW_AMPS_SEQUENTIAL_IO=TRUE \
@@ -137,7 +139,7 @@ RUN mkdir -p build && \
137139 -DPARFLOW_ENABLE_TIMING=TRUE \
138140 -DPARFLOW_HAVE_CLM=TRUE \
139141 -DPARFLOW_ENABLE_PYTHON=TRUE \
140- -DCURL_LIBRARY=/usr/lib/x86_64-linux-gnu /libcurl.so.4 \
142+ -DCURL_LIBRARY=/usr/lib/$arch /libcurl.so.4 \
141143 -DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR && \
142144 make install && \
143145 cd .. && \
0 commit comments