-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initially update Dockerfile of fates from sipnet
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# this needs to be at the top, what version are we building | ||
ARG IMAGE_VERSION="latest" | ||
|
||
# ---------------------------------------------------------------------- | ||
# BUILD SIPNET BINARY | ||
# ---------------------------------------------------------------------- | ||
FROM pecan/models:${IMAGE_VERSION} as model-binary | ||
|
||
# Some variables that can be used to set control the docker build | ||
ARG MODEL_VERSION=git | ||
|
||
# download, unzip and build sipnet | ||
WORKDIR /src | ||
RUN git clone https://github.com/PecanProject/fates.git \ | ||
&& cd sipnet \ | ||
&& if [ "${MODEL_VERSION}" != "git" ]; then git checkout ${MODEL_VERSION}; fi \ | ||
&& make | ||
|
||
######################################################################## | ||
|
||
# ---------------------------------------------------------------------- | ||
# BUILD PECAN FOR FATES | ||
# ---------------------------------------------------------------------- | ||
FROM pecan/models:${IMAGE_VERSION} | ||
|
||
|
||
# ---------------------------------------------------------------------- | ||
# SETUP FOR SPECIFIC SIPNET VERSION | ||
# ---------------------------------------------------------------------- | ||
|
||
# Some variables that can be used to set control the docker build | ||
ARG MODEL_VERSION=git | ||
|
||
# Setup model_info file | ||
COPY model_info.json /work/model.json | ||
RUN sed -i -e "s/@VERSION@/${MODEL_VERSION}/g" \ | ||
-e "s#@BINARY@#/usr/local/bin/fates.${MODEL_VERSION}#g" /work/model.json | ||
|
||
# COPY sipnet binary | ||
COPY --from=model-binary /src/CESM/fates /usr/local/bin/fates.${MODEL_VERSION} | ||
|
||
# /src/CESM/fates? |