-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile.amazonlinux
36 lines (34 loc) · 1.74 KB
/
Dockerfile.amazonlinux
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
FROM amazonlinux:2
RUN mkdir /dreal4
COPY . /dreal4
WORKDIR /dreal4
# Install prerequisites.
RUN yum install -y autoconf automake bison file flex gcc-c++ gcc-gfortran git gmp-devel make patch pkgconfig python3 tar wget which \
# Install COINOR-CLP
&& wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew \
&& chmod u+x coinbrew \
&& ./coinbrew fetch build --prefix=/usr --tests=none [email protected] \
&& cp /usr/lib/pkgconfig/*.pc /usr/share/pkgconfig/ \
# Install IBEX
&& curl https://codeload.github.com/dreal-deps/ibex-lib/tar.gz/352eeeb2345fb2b7a7ec248b44770d8cdc4a5d67 | tar xz \
&& cd ibex-lib-352eeeb2345fb2b7a7ec248b44770d8cdc4a5d67/ \
&& CXXFLAGS=-std=c++0x ./waf configure --enable-shared --with-optim --with-solver --with-affine-extended --interval-lib=filib --lp-lib=clp --prefix=/opt/libibex/2.7.4 \
&& ./waf install \
&& cd - \
# Install NLOPT
&& amazon-linux-extras install epel -y \
&& yum install NLopt-devel -y \
# Install Bazel
&& wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-8/vbatts-bazel-epel-8.repo \
&& mv vbatts-bazel-epel-8.repo /etc/yum.repos.d/ \
&& amazon-linux-extras install -y java-openjdk11 \
&& yum install bazel5 -y \
# Build dReal
&& cp /usr/include/FlexLexer.h ./third_party/com_github_westes_flex/FlexLexer.h \
&& bazel build //dreal:dreal \
&& mv bazel-bin/dreal/dreal /usr/bin/dreal \
# Clean up
&& cd / && rm -rf dreal4 \
&& rm -rf /opt/libibex/2.7.4/{bin,include,share} \
&& rm -rf /etc/yum.repos.d/vbatts-bazel-epel-8.repo \
&& yum remove -y autoconf automake bazel5 bison file flex gcc-c++ gcc-gfortran git java-11-openjdk java-11-openjdk-devel java-11-openjdk-headless make patch pkgconfig python3 tar wget which