-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
130 lines (113 loc) · 3.7 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
FROM ubuntu:xenial
MAINTAINER Sebastian Gutsche <[email protected]>
RUN apt-get update -qq \
&& apt-get install -y \
4ti2 \
ant \
ant-optional \
autoconf \
autogen \
bliss \
build-essential \
bzip2 \
clang \
cmake \
curl \
debhelper \
default-jdk \
gfortran \
git \
graphviz \
language-pack-el-base \
language-pack-en \
libbliss-dev \
libboost-dev \
libboost-python-dev \
libcdd-dev \
libcdd0d \
libdatetime-perl \
libflint-dev \
libglpk-dev \
libgmp-dev \
libgmp10 \
libgmpxx4ldbl \
libjson-perl \
libmpfr-dev \
libncurses5-dev \
libnormaliz-dev \
libntl-dev \
libperl-dev \
libppl-dev \
libreadline6-dev \
libsvn-perl \
libterm-readkey-perl \
libterm-readline-gnu-perl \
libtool \
libxml-libxml-perl \
libxml-libxslt-perl \
libxml-perl \
libxml-writer-perl \
libxml2-dev \
libxslt-dev \
libzmq3-dev \
m4 \
make \
nano \
ninja-build \
patch \
pkg-config \
python-dev \
python3-pip \
sudo \
unzip \
vim \
wget \
xsltproc \
zlib1g-dev
RUN adduser --quiet --shell /bin/bash --gecos "OSCAR user,101,," --disabled-password oscar \
&& adduser oscar sudo \
&& chown -R oscar:oscar /home/oscar/ \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& cd /home/oscar \
&& touch .sudo_as_admin_successful
USER oscar
ENV HOME /home/oscar
WORKDIR /home/oscar
RUN sudo pip3 install notebook jupyterlab_launcher jupyterlab traitlets ipython vdom
RUN mkdir .jupyter \
&& echo "c.NotebookApp.token = ''" > /home/oscar/.jupyter/jupyter_notebook_config.py
### Install Julia
ENV JULIA_VERSION julia-1.1.0
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/${JULIA_VERSION}-linux-x86_64.tar.gz \
&& tar xf ${JULIA_VERSION}-linux-x86_64.tar.gz \
&& rm ${JULIA_VERSION}-linux-x86_64.tar.gz \
&& sudo ln -snf /home/oscar/${JULIA_VERSION}/bin/julia /usr/local/bin/julia
### Install GAP & related
RUN wget -q https://github.com/gap-system/gap/archive/master.zip \
&& unzip -q master.zip \
&& rm master.zip \
&& cd gap-master \
&& ./autogen.sh \
&& ./configure --with-julia=/home/oscar/${JULIA_VERSION} --with-gc=julia \
&& make \
&& make bootstrap-pkg-full \
&& cd pkg \
&& ../bin/BuildPackages.sh \
&& sudo ln -snf /home/oscar/gap-master/gap /usr/local/bin/gap
RUN cd /home/oscar/gap-master/pkg \
&& git clone https://github.com/gap-packages/JupyterKernel.git \
&& cd JupyterKernel \
&& python3 setup.py install --user
ENV PATH /home/oscar/gap-master/pkg/JupyterKernel/bin:${PATH}
ENV JUPYTER_GAP_EXECUTABLE /home/oscar/.julia/gap.sh
ENV GAPROOT /home/oscar/gap-master
RUN julia -e "import Pkg; Pkg.add( \"IJulia\" )"
RUN julia -e "import Pkg; Pkg.add( \"CxxWrap\" )"
RUN julia -e "import Pkg; Pkg.add( \"AbstractAlgebra\" )"
RUN julia -e "import Pkg; Pkg.add( \"Nemo\" )"
RUN julia -e "import Pkg; Pkg.add( \"Polymake\" )"
RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/Singular.jl\", rev=\"master\" ))"
RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/GAP.jl\", rev=\"master\" ))"
RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/OSCAR.jl\", rev=\"master\" ))"
RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/thofma/Hecke.jl\", rev=\"master\" ))"
COPY Examples Examples