-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathEnergyPlus.Dockerfile
39 lines (27 loc) · 1.53 KB
/
EnergyPlus.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
ARG PYTHON_VERSION=3.9
FROM registry.git.rwth-aachen.de/ebc/ebc_all/github_ci/bim2sim/bim2sim:dev-py${PYTHON_VERSION}
# EnergyPlus part
ENV ENERGYPLUS_VERSION=9.4.0
ENV ENERGYPLUS_TAG=v9.4.0
ENV ENERGYPLUS_SHA=998c4b761e
ENV ENERGYPLUS_INSTALL_VERSION=9-4-0
ENV ENERGYPLUS_DOWNLOAD_BASE_URL https://github.com/NREL/EnergyPlus/releases/download/$ENERGYPLUS_TAG
ENV ENERGYPLUS_DOWNLOAD_FILENAME EnergyPlus-$ENERGYPLUS_VERSION-$ENERGYPLUS_SHA-Linux-Ubuntu18.04-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_URL $ENERGYPLUS_DOWNLOAD_BASE_URL/$ENERGYPLUS_DOWNLOAD_FILENAME
USER root
# Install necessary packages and EnergyPlus
RUN apt-get update && apt-get install -y ca-certificates curl libx11-6 libexpat1 \
&& rm -rf /var/lib/apt/lists/*
RUN curl -SLO --retry 5 --retry-delay 15 --retry-max-time 900 --connect-timeout 60 --max-time 3600 $ENERGYPLUS_DOWNLOAD_URL || \
(sleep 30 && curl -SLO --retry 5 --retry-delay 15 --retry-max-time 900 --connect-timeout 60 --max-time 3600 $ENERGYPLUS_DOWNLOAD_URL)
RUN chmod +x $ENERGYPLUS_DOWNLOAD_FILENAME
RUN echo "y\r" | ./$ENERGYPLUS_DOWNLOAD_FILENAME
RUN rm $ENERGYPLUS_DOWNLOAD_FILENAME
RUN cd /usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION \
&& rm -rf DataSets Documentation ExampleFiles WeatherData MacroDataSets PostProcess/convertESOMTRpgm \
PostProcess/EP-Compare PreProcess/FMUParser PreProcess/ParametricPreProcessor PreProcess/IDFVersionUpdater
# Remove broken symlinks
RUN cd /usr/local/bin && find -L . -type l -delete
USER $MAMBA_USER
VOLUME /var/simdata/energyplus
WORKDIR /var/simdata/energyplus