-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile.sagemath
37 lines (33 loc) · 1.3 KB
/
Dockerfile.sagemath
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
## -*- docker-image-name: "fplll/sagemath-g6k" -*-
FROM sagemath/sagemath:latest
MAINTAINER Martin Albrecht <[email protected]>
ARG JOBS=2
ARG FPLLL_BRANCH=master
ARG FPYLLL_BRANCH=master
ARG G6K_BRANCH=master
ARG CXXFLAGS="-O2 -march=x86-64"
ARG CFLAGS="-O2 -march=x86-64"
SHELL ["/home/sage/sage/src/bin/sage", "-sh", "-c"]
RUN sudo apt update && \
sudo apt install -y git pkg-config libtool libqd-dev build-essential autoconf
RUN git clone --branch $FPLLL_BRANCH https://github.com/fplll/fplll && \
cd fplll && \
autoreconf -i && \
CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS ./configure --prefix=$SAGE_LOCAL --disable-static && \
make -j $JOBS install && \
cd ..
RUN git clone --branch $FPYLLL_BRANCH https://github.com/fplll/fpylll && \
cd fpylll && \
pip3 install -r requirements.txt && \
pip3 install -r suggestions.txt && \
CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS python3 setup.py build -j $JOBS && \
rm -rf $SAGE_VENV/lib/python*/site-packages/fpylll && \
python3 setup.py -q install && \
cd ..
RUN git clone --branch $G6K_BRANCH https://github.com/fplll/g6k && \
cd g6k && \
pip3 install -r requirements.txt && \
CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS python3 setup.py build -j $JOBS && \
python3 setup.py -q install && \
cd ..
RUN rm -rf fplll fpylll g6k