forked from openearth/xbeach
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (44 loc) · 1.13 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
54
55
56
57
58
FROM library/centos:7 as builder
RUN yum update -y && \
yum install epel-release -y
RUN yum install -y gcc \
hdf5-devel \
libtool \
make \
netcdf-devel \
netcdf-fortran \
netcdf-fortran-devel \
openmpi-devel \
python-mako \
subversion
ENV PATH=/usr/lib64/openmpi/bin:$PATH \
LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
COPY . /opt/xbeach
WORKDIR /opt/xbeach
RUN ./autogen.sh && \
FCFLAGS=-I/usr/lib64/gfortran/modules ./configure --with-netcdf --without-mpi && \
make clean && \
make && \
make install
FROM library/centos:7
RUN yum update -y && \
yum install epel-release -y && \
yum install -y \
geos \
git \
netcdf-fortran-openmpi \
netcdf-fortran \
openmpi \
python34 \
python34-pip \
&& yum clean all
RUN pip3 install mmi
RUN git clone -b mmi https://github.com/openearth/xbeach-mi.git /opt/xbeach-mi
RUN cd /opt/xbeach-mi && python3 setup.py install
ENV PATH=/usr/lib64/openmpi/bin:$PATH \
LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH \
PORT=53606
EXPOSE 53606-53620
COPY --from=builder /usr/local/ /usr/local/
WORKDIR /data
CMD mmi-runner --port $PORT --pause xbeach params.txt