1
- FROM debian:stretch AS solvers
2
-
3
- # Install needed packages for building
4
- RUN apt-get update \
5
- && apt-get install -y curl cmake gcc g++ git libreadline-dev unzip
6
- RUN useradd -m user
7
- RUN install -d -o user -g user /solvers
8
- USER user
9
- WORKDIR /solvers
10
- RUN mkdir -p rootfs/usr/local/bin
11
-
12
- # Get Z3 4.8.10 from GitHub
13
- RUN curl -L https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-ubuntu-18.04.zip --output z3.zip
14
- RUN unzip z3.zip
15
- RUN mv z3-*/bin/z3 rootfs/usr/local/bin
16
-
17
- # Build abc from GitHub. (Latest version.)
18
- RUN git clone https://github.com/berkeley-abc/abc.git
19
- RUN cd abc && make -j$(nproc)
20
- RUN cp abc/abc rootfs/usr/local/bin
21
-
22
- # Build Boolector release 3.2.1 from source
23
- RUN curl -L https://github.com/Boolector/boolector/archive/3.2.1.tar.gz | tar xz
24
- RUN cd boolector* && ./contrib/setup-lingeling.sh && ./contrib/setup-btor2tools.sh && ./configure.sh && cd build && make -j$(nproc)
25
- RUN cp boolector*/build/bin/boolector rootfs/usr/local/bin
26
-
27
- # Install Yices 2.6.2
28
- RUN curl -L https://yices.csl.sri.com/releases/2.6.2/yices-2.6.2-x86_64-pc-linux-gnu-static-gmp.tar.gz | tar xz
29
- RUN cp yices*/bin/yices-smt2 rootfs/usr/local/bin \
30
- && cp yices*/bin/yices rootfs/usr/local/bin
31
-
32
- # Install CVC4 1.8
33
- RUN curl -L https://github.com/CVC4/CVC4/releases/download/1.8/cvc4-1.8-x86_64-linux-opt --output rootfs/usr/local/bin/cvc4
34
-
35
- # Install MathSAT 5.6.3 - Uncomment if you are in compliance with MathSAT's license.
36
- # RUN curl -L https://mathsat.fbk.eu/download.php?file=mathsat-5.6.3-linux-x86_64.tar.gz | tar xz
37
- # RUN cp mathsat-5.6.3-linux-x86_64/bin/mathsat rootfs/usr/local/bin
38
-
39
- # Set executable and run tests
40
- RUN chmod +x rootfs/usr/local/bin/*
41
-
42
- FROM haskell:8.8.4-stretch AS build
1
+ FROM ubuntu:22.04 AS build
43
2
USER root
44
- RUN apt-get update && apt-get install -y wget libncurses-dev unzip
3
+ RUN apt-get update && \
4
+ apt-get install -y \
5
+ # ghcup requirements
6
+ build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 \
7
+ # SAW dependencies
8
+ zlib1g-dev \
9
+ # Miscellaneous
10
+ git wget unzip
45
11
COPY --from=solvers /solvers/rootfs /
46
12
RUN useradd -m saw
47
13
COPY --chown=saw:saw . /home/saw
@@ -50,17 +16,28 @@ WORKDIR /home/saw
50
16
ENV LANG=C.UTF-8 \
51
17
LC_ALL=C.UTF-8
52
18
COPY cabal.GHC-8.8.4.config cabal.project.freeze
19
+ ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
20
+ RUN mkdir -p /home/saw/ghcup-download/bin && \
21
+ curl -L https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -o /home/saw/ghcup-download/bin/ghcup && \
22
+ chmod +x /home/saw/ghcup-download/bin/ghcup
23
+ RUN mkdir -p /home/saw/.ghcup && \
24
+ ghcup --version && \
25
+ ghcup install cabal 3.6.2.0 && \
26
+ ghcup install ghc 8.8.4 && \
27
+ ghcup set ghc 8.8.4
53
28
RUN cabal v2-update
54
29
RUN cabal v2-build
55
30
RUN mkdir -p /home/saw/rootfs/usr/local/bin
56
31
RUN cp $(cabal v2-exec which saw) /home/saw/rootfs/usr/local/bin/saw
57
32
WORKDIR /home/saw
33
+ RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
34
+ RUN unzip solvers.zip && rm solvers.zip && chmod +x *
58
35
USER root
59
36
RUN chown -R root:root /home/saw/rootfs
60
37
61
- FROM debian:stretch-slim
62
- RUN apt-get update \
63
- && apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip
38
+ FROM ubuntu:22.04
39
+ RUN apt-get update && \
40
+ apt-get install -y libgmp10 libgomp1 libffi8 wget libncurses6 libreadline-dev unzip
64
41
COPY --from=build /home/saw/rootfs /
65
42
COPY --from=solvers /solvers/rootfs /
66
43
RUN useradd -m saw && chown -R saw:saw /home/saw
0 commit comments