-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-base
308 lines (277 loc) · 8.35 KB
/
Dockerfile-base
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
#############
### base ###
#############
FROM python:3.9-slim-buster
LABEL \
org.opencontainers.image.title="BioSimulators-base" \
org.opencontainers.image.description="Docker image the dependencies for the simulation tools registered BioSimulators" \
org.opencontainers.image.url="https://biosimulators.org/" \
org.opencontainers.image.documentation="https://docs.biosimulations.org/" \
org.opencontainers.image.source="https://github.com/biosimulators/Biosimulators" \
org.opencontainers.image.authors="BioSimulators Team <[email protected]>" \
org.opencontainers.image.vendor="BioSimulators Team"
WORKDIR /app
###################################
# update apt package database
RUN apt-get update -y
###################################
# AMICI
RUN apt-get install --no-install-recommends -y \
g++ \
libatlas-base-dev \
swig
###################################
# BioNetGen
ARG BIONETGEN_VERSION=2.8.0
RUN apt-get install -y --no-install-recommends \
perl \
tar \
wget \
\
&& cd /tmp \
&& wget https://github.com/RuleWorld/bionetgen/releases/download/BioNetGen-${BIONETGEN_VERSION}/BioNetGen-${BIONETGEN_VERSION}-linux.tgz \
&& tar xvvf BioNetGen-${BIONETGEN_VERSION}-linux.tgz \
&& mv BioNetGen-${BIONETGEN_VERSION}/ /opt/ \
\
&& rm BioNetGen-${BIONETGEN_VERSION}-linux.tgz
ENV PATH=${PATH}:/opt/BioNetGen-${BIONETGEN_VERSION}/
###################################
# BoolNet
ARG BOOLNET_VERSION=2.1.5
RUN apt-get install -y --no-install-recommends \
r-base \
build-essential \
gcc \
gfortran \
libblas-dev \
libcurl4-openssl-dev \
libgit2-dev \
liblapack-dev \
libssl-dev \
libxml2 \
libxml2-dev \
\
&& Rscript \
-e "install.packages('devtools')" \
-e "require(devtools)" \
-e "install_version('BoolNet', version='${BOOLNET_VERSION}')" \
-e "require('BoolNet')"
###################################
# CBMPy
RUN apt-get install -y --no-install-recommends \
gcc \
libglpk-dev
###################################
# COBRAPY
RUN mkdir -p /.cache/cobrapy \
&& chmod ugo+rw /.cache/cobrapy
###################################
# COPASI
###################################
# GillesPy2
RUN apt-get install -y --no-install-recommends \
build-essential
###################################
# GINsim
RUN mkdir -p /usr/share/man/man1/ \
&& apt-get install -y --no-install-recommends \
default-jre \
wget \
\
&& cd /tmp \
&& pip install ginsim \
&& wget https://raw.githubusercontent.com/GINsim/GINsim-python/master/ginsim_setup.py \
&& python ginsim_setup.py \
\
&& rm ginsim_setup.py
###################################
# libSBMLSIM
ARG LSBMLSIM_VERSION=1.4.0
ARG LIBSBML_VERSION=5.19.0
# libSBML
RUN apt-get install --no-install-recommends -y \
wget \
libxml2 \
\
&& wget https://master.dl.sourceforge.net/project/sbml/libsbml/${LIBSBML_VERSION}/stable/Linux/64-bit/libSBML-${LIBSBML_VERSION}-Linux-x64.deb \
&& dpkg -i libSBML-${LIBSBML_VERSION}-Linux-x64.deb \
\
&& rm libSBML-${LIBSBML_VERSION}-Linux-x64.deb
ENV LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
# LibSBMLSim
RUN apt-get install --no-install-recommends -y \
wget \
build-essential \
cmake \
swig \
libbz2-dev \
\
&& PY_EXEC_PATH=$(which python) \
&& PY_PREFIX=$(echo ${PY_EXEC_PATH} | rev | cut -d "/" -f 3- | rev) \
&& cd /tmp \
&& wget https://github.com/libsbmlsim/libsbmlsim/archive/refs/tags/v${LSBMLSIM_VERSION}.tar.gz \
&& tar xvvf v${LSBMLSIM_VERSION}.tar.gz \
&& cd libsbmlsim-${LSBMLSIM_VERSION} \
&& mkdir build \
&& cd build \
&& PYTHON_MAJOR_MINOR_VERSION=$(echo $PYTHON_VERSION | cut -d . -f 1-2) \
&& cmake \
-D LIBSBML_INCLUDE_DIR=/usr/include \
-D LIBSBML_LIBRARY=/usr/lib64/libsbml.so \
-D WITH_PYTHON=ON \
-D PYTHON_PREFIX=${PY_PREFIX} \
-D PYTHON_EXECUTABLE:FILEPATH=${PY_EXEC_PATH} \
-D PYTHON_INCLUDE_DIR:PATH=/usr/local/include/python${PYTHON_MAJOR_MINOR_VERSION} \
-D PYTHON_LIBRARY:FILEPATH=/usr/local/lib/libpython${PYTHON_MAJOR_MINOR_VERSION}.so \
.. \
\
&& make \
&& make install \
\
&& cd /tmp \
&& rm v${LSBMLSIM_VERSION}.tar.gz \
&& rm -r libsbmlsim-${LSBMLSIM_VERSION}
###################################
# MASSpy
RUN apt-get install -y --no-install-recommends \
git \
gcc \
build-essential \
libfreetype6-dev \
libfreetype6 \
pkg-config \
\
&& mkdir -p /.cache/cobrapy
###################################
# NetPyNe
RUN apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
libmpich-dev \
mpi \
mpi-default-bin \
mpich
###################################
# NEURON
RUN apt-get install -y --no-install-recommends \
gcc \
g++ \
make
RUN pip install neuron
ENV NEURON_HOME=/usr/local
###################################
# pyNeuroML, LEMS
RUN mkdir -p /usr/share/man/man1/ \
&& apt-get install -y --no-install-recommends \
default-jre
###################################
# PySCeS
# SUNDIALS
# ignore certificate checking because certificate was expired as of 2021-11-10
ARG SUNDIALS_VERSION=2.6.2
RUN apt-get install -y --no-install-recommends \
wget \
cmake \
make \
g++ \
\
&& cd /tmp \
&& wget --no-check-certificate https://computing.llnl.gov/sites/default/files/inline-files/sundials-${SUNDIALS_VERSION}.tar.gz \
&& tar xvvf sundials-${SUNDIALS_VERSION}.tar.gz \
&& cd sundials-${SUNDIALS_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
\
&& cd /tmp \
&& rm sundials-${SUNDIALS_VERSION}.tar.gz \
&& rm -r sundials-${SUNDIALS_VERSION}
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
# Assimulo
RUN apt-get install -y --no-install-recommends \
g++ \
gfortran \
libblas-dev \
liblapack-dev \
git
# PySCeS
RUN apt-get install -y --no-install-recommends \
git \
gcc \
gfortran \
libgfortran5
# Configure PySCeS
COPY .pys_usercfg.ini /Pysces/.pys_usercfg.ini
COPY .pys_usercfg.ini /root/Pysces/.pys_usercfg.ini
RUN mkdir -p /Pysces \
&& mkdir -p /Pysces/psc \
&& mkdir -p /root/Pysces \
&& mkdir -p /root/Pysces/psc \
&& chmod ugo+rw -R /Pysces
###################################
# RBApy
RUN apt-get install -y --no-install-recommends \
gcc \
libglpk-dev
###################################
# Smoldyn
###################################
# tellurium
RUN apt-get install -y --no-install-recommends \
libxml2 \
libncurses5
ENV PLOTTING_ENGINE=matplotlib \
PYTHONWARNINGS="ignore:The 'warn' parameter of use():UserWarning:tellurium.tellurium,ignore:Matplotlib is currently using agg:UserWarning:tellurium.plotting.engine_mpl"
###################################
# XPP
RUN apt-get install -y --no-install-recommends \
wget \
make \
gcc \
libx11-dev \
libc6-dev \
libx11-6 \
libc6 \
\
&& cd /tmp \
&& wget http://www.math.pitt.edu/~bard/bardware/xppaut_latest.tar.gz \
&& mkdir xpp \
&& tar zxvf xppaut_latest.tar.gz --directory xpp \
&& cd xpp \
&& make \
&& make install \
\
&& cd /tmp \
&& rm xppaut_latest.tar.gz \
&& rm -r xpp
###################################
# setup headless for NEURON, Smoldyn
RUN apt-get -y update \
\
&& apt-get install --no-install-recommends -y \
xvfb \
&& mkdir /tmp/.X11-unix \
&& chmod 1777 /tmp/.X11-unix \
\
&& rm -rf /var/lib/apt/lists/*
COPY xvfb-startup.sh /xvfb-startup.sh
ENV XVFB_RES="1920x1080x24" \
XVFB_ARGS=""
###################################
# fonts for matplotlib
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends libfreetype6 \
&& rm -rf /var/lib/apt/lists/*
# configure matplotlib cache and config to avoid warnings
RUN mkdir -p /.cache/matplotlib \
&& mkdir -p /.config/matplotlib \
&& chmod ugo+rw /.config/matplotlib \
&& chmod ugo+rw /.cache/matplotlib
# Configure default simulator options
ENV ALGORITHM_SUBSTITUTION_POLICY=SIMILAR_VARIABLES \
VERBOSE=0 \
MPLBACKEND=PDF \
PLOTTING_ENGINE=matplotlib