-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
364 lines (315 loc) · 11.1 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
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# gnuoctave/build-octave
# Please follow docker best practices
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
# Docker images to build GNU Octave <https://www.octave.org>.
#FROM ubuntu:22.04
#LABEL maintainer="Kai T. Ohlhus <[email protected]>"
FROM debian:bookworm-slim
LABEL maintainer="GooseBerry"
ENV LAST_UPDATED=2024-05-19
# Install security updates and required packages.
RUN apt-get --yes update && \
apt-get --yes upgrade && \
DEBIAN_FRONTEND="noninteractive" \
apt-get --no-install-recommends --yes install \
curl \
gperf \
gzip \
info \
less \
locales \
openssh-client \
perl \
sudo \
tar \
unzip \
wget \
zip && \
apt-get --yes clean && \
apt-get --yes autoremove && \
rm -Rf /var/lib/apt/lists/*
# Original list of packages
# apt-get --no-install-recommends --yes install \
# autoconf \
# automake \
# bison \
# build-essential \
# clang \
# cmake \
# curl \
# dbus \
# epstool \
# fig2dev \
# flex \
# fonts-noto-cjk \
# fonts-noto-color-emoji \
# fonts-noto-mono \
# g++ \
# gcc \
# gfortran \
# git \
# gnuplot \
# gperf \
# gzip \
# icoutils \
# info \
# less \
# libcurl4-gnutls-dev \
# libfftw3-dev \
# libfltk1.3-dev \
# libfontconfig1-dev \
# libfreetype6-dev \
# libgl1-mesa-dev \
# libgl2ps-dev \
# libgmp-dev \
# libgnutls28-dev \
# libgpgme-dev \
# libgraphicsmagick++1-dev \
# libhdf5-dev \
# libmpfr-dev \
# libosmesa6-dev \
# libpcre3-dev \
# libqhull-dev \
# libqscintilla2-qt5-dev \
# libqt5opengl5-dev \
# libreadline-dev \
# librsvg2-bin \
# libseccomp-dev \
# libsndfile1-dev \
# libssl-dev \
# libtool \
# libxft-dev \
# locales \
# lpr \
# lzip \
# make \
# mercurial \
# openjdk-11-jdk \
# openssh-client \
# perl \
# pkg-config \
# portaudio19-dev \
# pstoedit \
# python3-pip \
# qtbase5-dev \
# qttools5-dev \
# qttools5-dev-tools \
# ssh-askpass \
# sudo \
# tar \
# texinfo \
# texlive-latex-extra \
# unzip \
# wget \
# xvfb \
# zlib1g-dev \
# zip && \
# pip3 install --upgrade --no-cache-dir \
# pip \
# sympy && \
#
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
# Configure environment
ENV SHELL=/bin/bash \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# Install OpenBLAS
#RUN OPENBLAS_VERSION=0.3.25 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://github.com/xianyi/OpenBLAS/archive/v${OPENBLAS_VERSION}.tar.gz" && \
# tar -xf v${OPENBLAS_VERSION}.tar.gz && \
# cd OpenBLAS-${OPENBLAS_VERSION} && \
# make -j8 \
# BINARY=64 \
# INTERFACE64=1 \
# DYNAMIC_ARCH=1 \
# DYNAMIC_OLDER=1 \
# CONSISTENT_FPCSR=1 \
# USE_THREAD=1 \
# USE_OPENMP=1 \
# NUM_THREADS=256 && \
# make install \
# PREFIX=/usr && \
# rm -rf /tmp/build
# Install SuiteSparse
#RUN SUITE_SPARSE_VERSION=5.10.1 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v${SUITE_SPARSE_VERSION}.tar.gz" && \
# tar -xf v${SUITE_SPARSE_VERSION}.tar.gz && \
# cd SuiteSparse-${SUITE_SPARSE_VERSION} && \
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/build/SuiteSparse-'"${SUITE_SPARSE_VERSION}"'/lib && \
# make library \
# LAPACK= \
# BLAS=-lopenblas \
# UMFPACK_CONFIG=-D'LONGBLAS=long' \
# CHOLMOD_CONFIG=-D'LONGBLAS=long' \
# LDFLAGS='-L/tmp/build/SuiteSparse-'"${SUITE_SPARSE_VERSION}"'/lib' && \
# make install \
# INSTALL=/usr \
# INSTALL_INCLUDE=/usr/include/suitesparse \
# INSTALL_DOC=/tmp/build/doc \
# LAPACK= \
# BLAS=-lopenblas \
# LDFLAGS='-L/tmp/build/SuiteSparse-'"${SUITE_SPARSE_VERSION}"'/lib' && \
# rm -rf /tmp/build
# Install ARPACK NG
#RUN ARPACK_NG_VERSION=3.9.1 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://github.com/opencollab/arpack-ng/archive/${ARPACK_NG_VERSION}.tar.gz" && \
# tar -xf ${ARPACK_NG_VERSION}.tar.gz && \
# cd arpack-ng-${ARPACK_NG_VERSION} && \
# ./bootstrap && \
# ./configure \
# --prefix=/usr \
# --libdir=/usr/lib \
# --with-blas='-lopenblas' \
# --with-lapack='' \
# INTERFACE64=1 \
# LT_SYS_LIBRARY_PATH=/usr/lib \
# LDFLAGS='-L/usr/lib' && \
# make -j8 && \
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib && \
# make check && \
# make install && \
# rm -rf /tmp/build
#
# Install QRUPDATE
#RUN QRUPDATE_VERSION=1.1.2 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "http://downloads.sourceforge.net/project/qrupdate/qrupdate/1.2/qrupdate-${QRUPDATE_VERSION}.tar.gz" && \
# tar -xf qrupdate-${QRUPDATE_VERSION}.tar.gz && \
# cd qrupdate-${QRUPDATE_VERSION} && \
# make lib \
# PREFIX=/usr \
# LAPACK="" \
# BLAS="-lopenblas" \
# FFLAGS="-L/usr/lib -fdefault-integer-8" && \
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib && \
# make test \
# PREFIX=/usr \
# LAPACK="" \
# BLAS="-lopenblas" \
# FFLAGS="-L/usr/lib -fdefault-integer-8 -fallow-argument-mismatch" && \
# make install \
# PREFIX=/usr \
# LAPACK="" \
# BLAS="-lopenblas" \
# FFLAGS="-L/usr/lib -fdefault-integer-8" && \
# rm -rf /tmp/build
# Install GLPK
#RUN GLPK_VERSION=5.0 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://ftp.gnu.org/gnu/glpk/glpk-${GLPK_VERSION}.tar.gz" && \
# tar -xf glpk-${GLPK_VERSION}.tar.gz && \
# cd glpk-${GLPK_VERSION} && \
# ./configure \
# --with-gmp \
# --prefix=/usr \
# --libdir=/usr/lib && \
# make -j8 && \
# make check && \
# make install && \
# rm -rf /tmp/build
# Install Sundials
#RUN SUNDIALS_VERSION=6.6.2 && \
# mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://github.com/LLNL/sundials/releases/download/v${SUNDIALS_VERSION}/sundials-${SUNDIALS_VERSION}.tar.gz" && \
# tar -xf sundials-${SUNDIALS_VERSION}.tar.gz && \
# cd sundials-${SUNDIALS_VERSION} && \
# mkdir build && \
# cd build && \
# cmake \
# -DEXAMPLES_ENABLE_C=OFF \
# -DENABLE_KLU=ON \
# -DKLU_INCLUDE_DIR=/usr/include/suitesparse \
# -DKLU_LIBRARY_DIR=/usr/lib \
# -DBUILD_ARKODE=OFF \
# -DBUILD_CVODE=OFF \
# -DBUILD_CVODES=OFF \
# -DBUILD_IDA=ON \
# -DBUILD_IDAS=OFF \
# -DBUILD_KINSOL=OFF \
# -DBUILD_CPODES=OFF \
# -DCMAKE_INSTALL_PREFIX=/usr \
# .. && \
# make -j8 && \
# make install && \
# rm -rf /tmp/build
# Install RapidJSON header library
#RUN mkdir -p /tmp/build && \
# cd /tmp/build && \
# wget -q "https://github.com/Tencent/rapidjson/archive/refs/heads/master.tar.gz" && \
# tar -xf master.tar.gz && \
# cp -R rapidjson-master/include/rapidjson /usr/include && \
# rm -rf /tmp/build
# Set Octave 64-bit build options
#ENV OCTAVE_CONFIGURE_ARGS="--prefix=/usr --enable-64 --with-blas='-lopenblas'" \
# F77_INTEGER_8_FLAG="-fdefault-integer-8"
# gnuoctave/octave
# Please follow docker best practices
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
# Docker images to build GNU Octave <https://www.octave.org>.
#ARG OCTAVE_VERSION_MAJOR
#FROM gnuoctave/octave-build:${OCTAVE_VERSION_MAJOR}
#LABEL maintainer="Kai T. Ohlhus <[email protected]>"
#ENV LAST_UPDATED=2023-11-19
# Update builder image with latest security updates
#RUN apt-get --yes update && \
# apt-get --yes upgrade && \
# apt-get --yes clean && \
# apt-get --yes autoremove && \
# rm -Rf /var/lib/apt/lists/*
# Removed
# pip3 install --upgrade --no-cache-dir \
# pip \
# sympy \
# || true && \
#
# Install Octave
#ARG OCTAVE_VERSION
#ARG GNU_MIRROR=https://ftpmirror.gnu.org/octave
#RUN mkdir -p /tmp/build \
# && cd /tmp/build \
# && wget -q "${GNU_MIRROR}/octave-${OCTAVE_VERSION}.tar.gz" \
# && tar -xf octave-${OCTAVE_VERSION}.tar.gz \
# && cd octave-${OCTAVE_VERSION} \
# && ./configure ${OCTAVE_CONFIGURE_ARGS} \
# F77_INTEGER_8_FLAG=${F77_INTEGER_8_FLAG} \
# && make -j8 \
# && make install \
# && rm -rf /tmp/build
# Newly added, just get packages from debian repo
RUN apt-get --yes update && \
apt-get --yes upgrade && \
apt-get --yes install octave octave-parallel && \
apt-get --yes clean && \
apt-get --yes autoremove && \
rm -Rf /var/lib/apt/lists/*
#WORKDIR /workdir
#CMD ["octave-cli"]
# To allow SSH via VPN
#FROM alpine:latest
#RUN apk add --no-cache --update bash openssh iproute2 tcpdump net-tools screen
RUN apt-get --yes update && \
apt-get --yes upgrade && \
apt-get --yes install openssh net-tools screen && \
apt-get --yes clean && \
apt-get --yes autoremove && \
rm -Rf /var/lib/apt/lists/*
RUN echo "UseDNS no" >> /etc/ssh/sshd_config && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && \
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
#FROM gnuoctave/octave:latest
WORKDIR /golem/work
VOLUME /golem/work
COPY Dockerfile /golem/info/description.txt
COPY Dockerfile /golem/work/info.txt