forked from rgknox/ED2
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
55 lines (42 loc) · 1.51 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
# ----------------------------------------------------------------------
# BUILD MODEL BINARY
# ----------------------------------------------------------------------
FROM debian:buster-slim AS builder
# Some variables that can be used to set control the docker build
ARG MODEL_VERSION="2.2.0"
ARG BINARY_VERSION="2.2"
# specify fortran compiler
ENV FC_TYPE=GNU
# install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
gfortran \
git \
libhdf5-dev \
libopenmpi-dev \
&& rm -rf /var/lib/apt/lists/*
# download, unzip and build ed2
COPY . /src/
WORKDIR /src/ED/build
RUN ./install.sh -g -p docker && mv ed_*-opt ed
########################################################################
# ----------------------------------------------------------------------
# BUILD PECAN FOR MODEL
# ----------------------------------------------------------------------
FROM debian:buster-slim
# ----------------------------------------------------------------------
# INSTALL MODEL SPECIFIC PIECES
# ----------------------------------------------------------------------
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libhdf5-103 \
libopenmpi3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /data
# Some variables that can be used to set control the docker build
ARG MODEL_VERSION="2.2.0"
ENV MODEL_VERSION="${MODEL_VERSION}"
# COPY model binary
COPY --from=builder /src/ED/build/ed /usr/local/bin/ed