Skip to content

Commit

Permalink
docker build update
Browse files Browse the repository at this point in the history
  • Loading branch information
danbryce committed Feb 26, 2018
1 parent e8ca181 commit 102ef9f
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 6 deletions.
25 changes: 22 additions & 3 deletions Dockerfile
@@ -1,4 +1,23 @@
FROM ubuntu:16.04
FROM ubuntu
MAINTAINER Soonho Kong <soonho.kong@gmail.com>
COPY bin/dReal /usr/local/bin/dReal
#ENTRYPOINT dReal
COPY bin/dReal /usr/local/bin/
COPY bin/dReach /usr/local/bin/
COPY bin/bmc /usr/local/bin/
RUN apt-get update
RUN apt-get -y install -qq build-essential
RUN apt-get -y install -qq autoconf automake bison flex git libtool make pkg-config python-software-properties texinfo
ADD https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh /cmake-3.7.2-Linux-x86_64.sh
RUN mkdir /opt/cmake
RUN sh /cmake-3.7.2-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN apt-get -y install -qq libbz2-dev coinor-libclp-dev clang-format glpk-utils libglpk-dev glpk-doc python-glpk
RUN apt-get -y install software-properties-common python-software-properties && \
add-apt-repository ppa:jonathonf/gcc-7.1 && \
apt-get update && \
apt-get -y install gcc-7 g++-7
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
RUN apt-get -y install python-dev # for python2.x installs && \
apt-get -y install python3-dev # for python3.x installs

ENTRYPOINT dReal
9 changes: 9 additions & 0 deletions build-all-docker.sh
@@ -0,0 +1,9 @@
cd tools
make dist-clean
docker build . -t dreal3-tools
docker run -v `pwd`/../bin:/usr/local/src/dreal/bin -v `pwd`:/usr/local/src/dreal/tools dreal3-tools
cd ../dockerbuild
docker build . -t dreal3-build
docker run -v `pwd`/../src:/usr/local/src/dreal/src -v `pwd`/../bin:/usr/local/src/dreal/bin dreal3-build
cd ..
docker build . -t dreal3
16 changes: 14 additions & 2 deletions dockerbuild/Dockerfile
Expand Up @@ -5,9 +5,21 @@ VOLUME /usr/local/src/dreal/bin
RUN apt-get update
RUN apt-get -y install -qq build-essential
RUN apt-get -y install -qq autoconf automake bison flex git libtool make pkg-config python-software-properties texinfo
RUN apt-get -y install -qq cmake
ADD https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh /cmake-3.7.2-Linux-x86_64.sh
RUN mkdir /opt/cmake
RUN sh /cmake-3.7.2-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN apt-get -y install -qq libbz2-dev coinor-libclp-dev clang-format glpk-utils libglpk-dev glpk-doc python-glpk
RUN apt-get -y install software-properties-common python-software-properties && \
add-apt-repository ppa:jonathonf/gcc-7.1 && \
apt-get update && \
apt-get -y install gcc-7 g++-7
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
RUN apt-get -y install python-dev # for python2.x installs && \
apt-get -y install python3-dev # for python3.x installs

RUN mkdir -p /usr/local/src/dreal/build/release
WORKDIR /usr/local/src/dreal/build/release
COPY build.sh .
ENTRYPOINT /bin/bash build.sh

1 change: 1 addition & 0 deletions dockerbuild/build.sh
@@ -1,3 +1,4 @@
#!/bin/bash
cmake -DCMAKE_BUILD_TYPE=RELEASE ../../src
make
#cp /usr/local/src/dreal/build/release/dReal /usr/local/src/dreal/bin/dReal-docker
18 changes: 18 additions & 0 deletions tools/Dockerfile
@@ -0,0 +1,18 @@
FROM ubuntu
VOLUME /usr/local/src/dreal/tools
VOLUME /usr/local/src/dreal/bin
RUN apt-get update
RUN apt-get -y install software-properties-common
#RUN add-apt-repository ppa:avsm/ppa -yy
#RUN apt-get update
RUN apt-get -y install -qq build-essential make ocaml opam m4
RUN opam init
RUN opam config setup -a
RUN eval `opam config env`
RUN opam update
RUN opam install ocamlfind batteries oasis
#RUN export PATH=~/.opam/system/bin:$PATH
RUN ln -s ~/.opam/system/bin/oasis /usr/local/bin
RUN ln -s /usr/bin/* /usr/local/bin
WORKDIR /usr/local/src/dreal/tools
ENTRYPOINT make
2 changes: 1 addition & 1 deletion tools/Makefile
@@ -1,5 +1,5 @@
all: setup.ml setup.data build
@if [ ! -L ../bin/bmc ]; then ln -s ../tools/bmc_main.native ../bin/bmc; fi
@if [ ! -L ../bin/bmc ]; then cp _build/bmc/src/bmc_main.native ../bin/bmc; fi

setup.ml: _oasis
oasis setup
Expand Down

0 comments on commit 102ef9f

Please sign in to comment.