-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
42 lines (33 loc) · 1.32 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
FROM gapsystem/gap-docker-base
MAINTAINER The GAP Group <[email protected]>
ENV GAP_BRANCH=master
ENV GAP_VERSION=5d7dad621856a93ec86345c8b557ce6e35236d36
# download and build GAP
RUN mkdir /home/gap/inst/ \
&& cd /home/gap/inst/ \
&& mkdir gap-${GAP_BRANCH} \
&& cd gap-${GAP_BRANCH} \
&& git init \
&& git remote add origin https://github.com/gap-system/gap \
&& git fetch --depth 1 origin $GAP_VERSION \
&& git checkout FETCH_HEAD \
&& ./autogen.sh \
&& ./configure --enable-hpcgap \
&& make -j4 \
&& cp bin/gap.sh bin/gap
# download and build GAP packages
RUN mkdir /home/gap/inst/gap-${GAP_BRANCH}/pkg \
&& cd /home/gap/inst/gap-${GAP_BRANCH}/pkg \
&& wget -q https://files.gap-system.org/gap4pkgs/packages-${GAP_BRANCH}.tar.gz \
&& tar xzf packages-${GAP_BRANCH}.tar.gz \
&& ../bin/BuildPackages.sh
# build JupyterKernel
RUN cd /home/gap/inst/gap-${GAP_BRANCH}/pkg \
&& mv JupyterKernel-* JupyterKernel \
&& cd JupyterKernel \
&& pip3 install . --user
RUN jupyter serverextension enable --py jupyterlab --user
ENV PATH /home/gap/inst/gap-${GAP_BRANCH}/pkg/JupyterKernel/bin:${PATH}
ENV JUPYTER_GAP_EXECUTABLE "/home/gap/inst/gap-${GAP_BRANCH}/bin/gap.sh -S --single-thread"
ENV GAP_HOME /home/gap/inst/gap-${GAP_BRANCH}
ENV PATH ${GAP_HOME}/bin:${PATH}