-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
101 lines (76 loc) · 2.33 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#RMM ParFlow test
# start by building the basic container
FROM centos:latest
MAINTAINER Reed Maxwell <[email protected]>
#
RUN yum install -y gcc \
build-essential \
cmake3 \
make \
g++ \
gcc-c++ \
gdc \
gcc-gfortran \
tcl-devel \
tk-dev \
git
RUN yum install -y openmpi
RUN yum install -y zlib
RUN whereis mpicc
RUN alias which=/usr/bin/whereis
#RUN mpirun --version
# make directories
RUN mkdir /home/parflow
#RUN mkdir parflow
#RUN mkdir silo
#RUN mkdir hypre
# set environment vars
#ENV CC gcc
#ENV CXX g++
#ENV FC gfortran
#ENV F77 gfortran
#ENV PARFLOW_DIR /home/parflow/parflow_build
ENV PARFLOW_DIR /home/parflow/parflow
ENV SILO_DIR /home/parflow/silo-4.10.2
ENV HYPRE_DIR /home/parflow/hypre
ENV PATH /usr/local/bin/:/usr/bin/gcc:/usr/lib/gcc:/usr/libexec/gcc:$PATH
ENV PATH $PATH:/usr/lib64/openmpi-x86_64/bin/:/usr/include/openmpi-x86_64/
WORKDIR /home/parflow
RUN git clone -b master --single-branch https://github.com/parflow/parflow.git parflow
#RUN pwd
#RUN ls
# build libraries
#SILO
RUN curl "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.10.2/silo-4.10.2.tar.gz" -o "silo-4.10.2.tar.gz"
RUN tar -xvf silo-4.10.2.tar.gz
WORKDIR $SILO_DIR
RUN ./configure --prefix=$SILO_DIR --disable-silex --disable-hzip --disable-fpzip
RUN make install
#Hypre
WORKDIR /home/parflow
RUN git clone -b master --single-branch https://github.com/LLNL/hypre.git hypre
WORKDIR $HYPRE_DIR/src
RUN ./configure --prefix=$HYPRE_DIR --without-MPI
RUN make install
# build ParFlow
WORKDIR $PARFLOW_DIR/pfsimulator
RUN ./configure --prefix=$PARFLOW_DIR --with-clm --enable-timing --with-silo=$SILO_DIR --with-hypre=$HYPRE_DIR --with-amps=seq --without-mpi --with-amps-sequential-io
RUN make install
# build PFTools
WORKDIR $PARFLOW_DIR/pftools
RUN ./configure --prefix=$PARFLOW_DIR --enable-timing --with-silo=$SILO_DIR --with-amps=seq --without-mpi --with-amps-sequential-io
RUN make install
# test
WORKDIR $PARFLOW_DIR/test
RUN make check
#RUN cmake ../parflow \
# -DPARFLOW_AMPS_LAYER=seq \
# -DHYPRE_ROOT=$HYPRE_DIR \
# -DSILO_ROOT=$SILO_DIR \
# -DPARFLOW_ENABLE_TIMING=TRUE \
# -DPARFLOW_HAVE_CLM=ON \
# -DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR
##
WORKDIR $PARFLOW_DIR
CMD ["parflow","/home/parflow/parflow/test/tclsh default_single.tcl 1 1 1"]
ENTRYPOINT ["parflow"]