-
Notifications
You must be signed in to change notification settings - Fork 0
/
vecogen.def
86 lines (71 loc) · 2.03 KB
/
vecogen.def
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
BootStrap: docker
From: debian:latest
%files
requirements.txt /Vecogen/requirements.txt
. /Vecogen
%post
# Update the package list and install dependencies
apt-get update && apt-get install -y \
opam \
m4 \
bubblewrap \
wget \
gcc \
libc-dev \
make \
unzip \
graphviz \
libcairo2-dev \
libexpat1-dev \
libgmp-dev \
libgtk-3-dev \
libgtksourceview-3.0-dev \
pkg-config \
zlib1g-dev \
python3-pip
# Initialize OPAM (OCaml Package Manager) and install OCaml
opam init -y --disable-sandboxing
opam update
opam switch create 4.14.1
opam switch 4.14.1
eval $(opam env)
# Allow installing stuff to system Python.
rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED
# Upgrade pip to the latest version.
pip3 install --upgrade pip
# Install Python dependencies
cd /Vecogen
pip3 install -r requirements.txt
# Install opam-depext and frama-c
eval $(opam env)
opam install -y opam-depext
opam depext --install -y frama-c
# Install required packages for solvers
apt-get update
apt-get install -y wget unzip
echo "Installing solvers..."
# Install CVC5
CVC5_URL="https://github.com/cvc5/cvc5/releases/download/cvc5-1.1.2/cvc5-Linux-static.zip"
wget $CVC5_URL -O cvc5.zip
unzip cvc5.zip
cp cvc5-Linux-static/bin/cvc5 /usr/local/bin
chmod +x /usr/local/bin/cvc5
cvc5 --version
rm -rf cvc5-Linux-static cvc5.zip
# Install Z3
Z3_URL="https://github.com/Z3Prover/z3/releases/download/z3-4.8.6/z3-4.8.6-x64-ubuntu-16.04.zip"
wget $Z3_URL -O z3.zip
unzip z3.zip
cp z3-4.8.6-x64-ubuntu-16.04/bin/z3 /usr/local/bin
chmod +x /usr/local/bin/z3
z3 -version
rm -rf z3-4.8.6-x64-ubuntu-16.04 z3.zip
# Configure Why3
why3 config detect
echo "Done!"
%environment
# Set environment variables
eval $(opam env)
%runscript
# Command to run when the container starts
exec bash