-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
148 lines (131 loc) · 4.35 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
FROM ubuntu:bionic
MAINTAINER The GAP Group <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# Prerequisites
RUN dpkg --add-architecture i386 \
&& apt-get update -qq \
&& apt-get -qq install -y \
autoconf \
autogen \
automake \
build-essential \
cmake \
curl \
g++ \
gcc \
gcc-multilib \
git \
libboost-dev \
libcdd-dev \
libcurl4-openssl-dev \
libflint-dev \
libglpk-dev \
libgmp-dev \
libgmpxx4ldbl \
libmpc-dev \
libmpfi-dev \
libmpfr-dev \
libncurses5-dev \
libntl-dev \
libreadline6-dev \
libtool \
libxml2-dev \
libzmq3-dev \
m4 \
mercurial \
polymake \
python3-pip \
sudo \
unzip \
wget \
&& ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
RUN pip3 install notebook jupyterlab_launcher jupyterlab traitlets ipython vdom
# add gap user
RUN adduser --quiet --shell /bin/bash --gecos "GAP user,101,," --disabled-password gap \
&& adduser gap sudo \
&& chown -R gap:gap /home/gap/ \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& cd /home/gap \
&& touch .sudo_as_admin_successful
# CXSC (for Float)
ENV CXSC_VERSION 2-5-4
RUN cd /tmp \
&& wget http://www2.math.uni-wuppertal.de/wrswt/xsc/cxsc/cxsc-${CXSC_VERSION}.tar.gz \
&& tar -xf cxsc-${CXSC_VERSION}.tar.gz \
&& mkdir cxscbuild \
&& cd cxscbuild \
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/cxsc /tmp/cxsc-${CXSC_VERSION} \
&& make \
&& make install
# libfplll (for Float)
ENV FPLLL_VERSION 5.2.1
RUN cd /tmp \
&& wget https://github.com/fplll/fplll/releases/download/${FPLLL_VERSION}/fplll-${FPLLL_VERSION}.tar.gz \
&& tar -xf fplll-${FPLLL_VERSION}.tar.gz \
&& rm fplll-${FPLLL_VERSION}.tar.gz \
&& cd fplll-${FPLLL_VERSION} \
&& ./configure \
&& make \
&& make install \
&& cd /tmp \
&& rm -rf fplll-${FPLLL_VERSION}
# flint (for Singular)
# RUN cd /tmp \
# && git clone https://github.com/wbhart/flint2.git \
# && cd flint2 \
# && ./configure \
# && make -j4 \
# && make install \
# && cd /tmp \
# && rm -rf flint2
# Singular
ENV SINGULAR_VERSION 4.1.2
ENV SINGULAR_PATCH p1
RUN cd /opt \
&& wget http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/$(echo ${SINGULAR_VERSION} | tr . -)/singular-${SINGULAR_VERSION}${SINGULAR_PATCH}.tar.gz \
&& tar -xf singular-${SINGULAR_VERSION}${SINGULAR_PATCH}.tar.gz \
&& rm singular-${SINGULAR_VERSION}${SINGULAR_PATCH}.tar.gz \
&& chown -hR gap singular-${SINGULAR_VERSION} \
&& cd singular-${SINGULAR_VERSION} \
&& ./configure \
&& make -j4 \
&& make install
# 4ti2
ENV _4TI2_VERSION 1_6_9
RUN cd /opt \
&& wget https://github.com/4ti2/4ti2/archive/Release_${_4TI2_VERSION}.tar.gz \
&& tar -xf Release_${_4TI2_VERSION}.tar.gz \
&& chown -hR gap 4ti2-Release_${_4TI2_VERSION} \
&& rm Release_${_4TI2_VERSION}.tar.gz \
&& cd 4ti2-Release_${_4TI2_VERSION} \
&& chmod +x autogen.sh \
&& ./autogen.sh \
&& ./configure \
&& touch doc/4ti2_manual.pdf \
&& make -j4 \
&& make install
# Pari/GP
ENV PARI_VERSION 2.9.5
RUN cd /tmp/ \
&& wget https://pari.math.u-bordeaux.fr/pub/pari/OLD/2.9/pari-${PARI_VERSION}.tar.gz \
&& tar -xf pari-${PARI_VERSION}.tar.gz \
&& rm pari-${PARI_VERSION}.tar.gz \
&& cd pari-${PARI_VERSION} \
&& ./Configure \
&& make install
# Macaulay2
RUN echo "deb http://www.math.uiuc.edu/Macaulay2/Repositories/Ubuntu $(lsb_release -sc) main" >/etc/apt/sources.list.d/macaulay2.list \
&& wget http://www2.macaulay2.com/Macaulay2/PublicKeys/Macaulay2-key \
&& apt-key add Macaulay2-key \
&& apt-get update -qq \
&& apt-get -qq install -y macaulay2
ENV LD_LIBRARY_PATH /usr/local/lib:${LD_LIBRARY_PATH}
# Set up new user and home directory in environment.
USER gap
ENV HOME /home/gap
# Note that WORKDIR will not expand environment variables in docker versions < 1.3.1.
# See docker issue 2637: https://github.com/docker/docker/issues/2637
# Start at $HOME.
WORKDIR /home/gap
# Start from a BASH shell.
CMD ["bash"]