vwmaus / model-reproducibility

Research Proposal Master Thesis: Improving reproducibility in Earth Science
GNU General Public License v3.0
0 stars 1 forks source link

Variables from interface to dockerfile template #30

Closed vwmaus closed 6 years ago

vwmaus commented 6 years ago

@ptrkrnstnr please pull from my master branch to update your version of the repository. I updated the Dockerfile templates. You will need to update the interface to get the GAMS version from the IIASA Docker hub repository and remove the call to the gams-dockerfile template (not need any more).

In the model template, you have to set the following variables: #GAMS_VERSION#, #GITHUB_USER#, #MODEL#, #MODEL_VERSION#, #DATA_VERSION#, which are included in the Dockerfile as shown below. I will still include the command to download the data from Geonode, but that we will check later.

FROM iiasa/gams:#GAMS_VERSION#
MAINTAINER "Victor Maus" maus@iiasa.ac.at

# Get GitHub repository from web interface
ENV GITHUB_USER=#GITHUB_USER#

# Get GitHub repository from web interface 
ENV GITHUB_REPO=#MODEL#

# Get model version from web interface 
ENV GITHUB_RELEASE=#MODEL_VERSION#

# Get data version from web interface 
ENV GEONODE_DATA=#DATA_VERSION#

# Clone github repository  
RUN git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}.git" /workspace

# Set workspace 
WORKDIR /workspace

# Checkout model version 
RUN git checkout ${GITHUB_RELEASE}

# Run model during container start 
ENTRYPOINT ["/bin/bash", "-c", "gams model.gms gdx=output"]

Thanks!

ptrkrnstnr commented 6 years ago

@vwmaus changes done but I'm missing the Gams licence placeholder. Right now I solved the licence problem as the user can upload his Gams licence file to the server now (part of the form). So I can either use the file which will be stored in "wwwroot/uploads" or I can read the content of the file and use the content. Please let me know what to do with the file!