-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
53 lines (41 loc) · 1.99 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-FileCopyrightText: 2022 Helmholtz-Zentrum Hereon
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileContributor: Carsten Lemmen <[email protected]
ARG COMMUNICATOR="openmpi"
FROM registry.hzdr.de/schism/esmf-docker/esmf:v8.4.0-${COMMUNICATOR}
# FROM platipodium/esmf:openmpi-${COMMUNICATOR}
LABEL description="SCHISM-ESMF Docker environment based on Ubuntu"
LABEL author="Carsten Lemmen <[email protected]>"
LABEL license="CC0-1.0"
LABEL copyright="2022 Helmholtz-Zentrum Hereon"
# Further arguments can be passed via the --build-arg key=value command to the
# docker build command. The default values are set below to superbee
ARG TVD_LIM="SB"
# Make ARG variables available within the container
ENV TVD_LIM ${TVD_LIM}
ENV COMMUNICATOR ${COMMUNICATOR}
RUN apt-get update && apt-get -qy upgrade
RUN apt-get update && apt-get -qy \
install make lib${COMMUNICATOR}-dev \
cmake wget python3 python3-pip \
python-is-python3 libnetcdf-dev \
libnetcdff-dev libxerces-c-dev liblapack-dev libyaml-cpp-dev \
libparmetis-dev libmetis-dev subversion cvs git \
gcc-11 gfortran-11 g++-11
# Remove all mpich related packages if communicator is not mpich, or
# do the same for openmpi
RUN if [ "x${COMMUNICATOR}" != "xmpich" ] ; then apt-get remove -qy *mpich* ; fi
RUN if [ "x${COMMUNICATOR}" != "xopenmpi" ] ; then apt-get remove -qy *openmpi* ; fi
ENV PATH="/usr/lib64/${COMMUNICATOR}/bin:${PATH}"
WORKDIR /usr/src
ENV SCHISM_DIR="/usr/src/schism"
ENV SCHISM_BUILD_DIR="/usr/src/schism/build"
ENV SCHISM_ESMF_DIR="/usr/src/schism-esmf"
ENV OLDIO="ON"
RUN git clone --branch master --depth 1 https://github.com/schism-dev/schism ${SCHISM_DIR}
RUN mkdir -p ${SCHISM_BUILD_DIR}
RUN cmake -S ${SCHISM_DIR}/src -B ${SCHISM_BUILD_DIR} -DOLDIO=${OLDIO} -DTVD_LIM=${TVD_LIM}
RUN make -C /usr/src/schism/build -j8 pschism
RUN git clone --branch master --depth 1 https://github.com/schism-dev/schism-esmf ${SCHISM_ESMF_DIR}
RUN make -C ${SCHISM_ESMF_DIR} -j1 lib
RUN make -C ${SCHISM_ESMF_DIR} -j1 install