forked from google/souper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (53 loc) · 2.15 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
from ubuntu:16.04
run set -x; \
apt-get update -qq \
&& apt-get remove -y -qq clang llvm llvm-runtime \
&& apt-get install libgmp10 \
&& echo 'ca-certificates gcc g++ valgrind libc6-dev libgmp-dev cmake ninja-build make autoconf automake libtool golang-go python subversion git' > /usr/src/build-deps \
&& apt-get install -y $(cat /usr/src/build-deps) --no-install-recommends \
&& git clone https://github.com/Z3Prover/z3.git /usr/src/z3 \
&& git clone https://github.com/antirez/redis /usr/src/redis
run cd /usr/src/z3 \
&& git checkout z3-4.6.0 \
&& python scripts/mk_make.py --noomp \
&& cd build \
&& make -j10 \
&& make install
run cd /usr/src/redis \
&& git checkout 4.0.6 \
&& make -j4 \
&& make install
run export GOPATH=/usr/src/go \
&& go get github.com/garyburd/redigo/redis
add update_deps.sh /usr/src/souper/update_deps.sh
add clone_and_test.sh /usr/src/souper/clone_and_test.sh
run cd /usr/src/souper \
# && ./update_deps.sh Debug \
# && rm -rf third_party/llvm/Debug-build \
&& ./update_deps.sh Release \
&& rm -rf third_party/llvm/Release-build \
&& rm -rf third_party/hiredis/install/lib/libhiredis.so*
add CMakeLists.txt /usr/src/souper/CMakeLists.txt
add docs /usr/src/souper/docs
add include /usr/src/souper/include
add lib /usr/src/souper/lib
add test /usr/src/souper/test
add tools /usr/src/souper/tools
add utils /usr/src/souper/utils
add runtime /usr/src/souper/runtime
add unittests /usr/src/souper/unittests
run export GOPATH=/usr/src/go \
&& mkdir -p /usr/src/souper-build \
&& cd /usr/src/souper-build \
&& CC=/usr/src/souper/third_party/llvm/Release/bin/clang CXX=/usr/src/souper/third_party/llvm/Release/bin/clang++ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DTEST_SYNTHESIS=ON -DTEST_SOLVER=-z3-path=/usr/bin/z3 ../souper \
&& ninja souperweb souperweb-backend \
&& ninja check \
&& cp souperweb souperweb-backend /usr/local/bin \
&& cd .. \
&& rm -rf /usr/src/souper-build \
&& strip /usr/local/bin/* \
&& groupadd -r souper \
&& useradd -r -g souper souper \
&& mkdir /data \
&& chown souper:souper /data \
&& rm -rf /usr/local/include /usr/local/lib/*.a /usr/local/lib/*.la