-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
62 lines (46 loc) · 2.03 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
# Please install docker according to the guideline provided here: https://docs.docker.com/engine/install/ubuntu/
FROM debian:latest
ARG DEBIAN_FRONTEND=noninteractive
# Install some basic packages
RUN apt-get update && apt-get install -y build-essential git cmake wget curl python3 python3-pip python3-dev
# Install python-sat
RUN python3 -m pip install python-sat[pblib,aiger]
# Install pysmt
RUN python3 -m pip install pysmt
# Install smt solvers supported by pysmt
RUN python3 -m pip install cython
RUN yes | python3 -m pysmt install --btor
RUN yes | python3 -m pysmt install --z3
# Install Z3 solver
RUN python3 -m pip install z3-solver
# Install MiniZinc
WORKDIR /home/tools/
RUN wget https://github.com/MiniZinc/MiniZincIDE/releases/download/2.6.3/MiniZincIDE-2.6.3-bundle-linux-x86_64.tgz && \
mkdir MiniZinc && \
tar zxvf MiniZincIDE-2.6.3-bundle-linux-x86_64.tgz -C MiniZinc --strip-components=1 && \
rm MiniZincIDE-2.6.3-bundle-linux-x86_64.tgz
RUN ln -s /home/tools/MiniZinc/bin/minizinc /usr/local/bin/minizinc
# Install Python interface of MiniZinc
RUN python3 -m pip install minizinc
# Install Or-Tools
WORKDIR /home/tools/
RUN wget https://github.com/google/or-tools/releases/download/v9.2/or-tools_amd64_flatzinc_debian-11_v9.2.9972.tar.gz && \
mkdir or-tools && \
tar xvzf or-tools_amd64_flatzinc_debian-11_v9.2.9972.tar.gz -C or-tools --strip-components=1 && \
rm or-tools_amd64_flatzinc_debian-11_v9.2.9972.tar.gz
# Install Gurobi (Restricted license - for non-production use only)
RUN python3 -m pip install gurobipy
# Install SageMath
RUN apt-get install -y sagemath
# Install Graphviz
RUN apt-get install -y graphviz
# Install Python interface of Graphviz
RUN python3 -m pip install graphviz
# Install dot2tex
RUN python3 -m pip install dot2tex
# Clone Autoguess and introduce Or-Tools to MiniZinc
RUN git clone https://github.com/hadipourh/autoguess
WORKDIR /home/tools/autoguess
RUN cp configfiles/ortools.msc /home/tools/MiniZinc/share/minizinc/solvers
# Clean
RUN apt-get clean && rm -rf /var/lib/apt/lists/*