From fd01e3fab51a6f4990feb0eb57e0b564fb729a39 Mon Sep 17 00:00:00 2001 From: "Fedor Shmarov (PGR)" Date: Sat, 21 May 2016 18:43:06 +0100 Subject: [PATCH] added dockerbuild --- Dockerfile | 10 ++-------- dockerbuild/Dockerfile | 9 +++++++++ dockerbuild/build.sh | 4 ++++ CMakeLists.txt => src/CMakeLists.txt | 4 ++-- 4 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 dockerbuild/Dockerfile create mode 100644 dockerbuild/build.sh rename CMakeLists.txt => src/CMakeLists.txt (97%) diff --git a/Dockerfile b/Dockerfile index 585fb99d..c938b5d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,4 @@ FROM dreal/dreal3 MAINTAINER Fedor Shmarov -RUN apt-get -y install libgsl0-dev -COPY . /usr/local/src/probreach -WORKDIR /usr/local/src/probreach -RUN mkdir -p /build/release -WORKDIR /usr/local/src/probreach/build/release -RUN cmake ../../ -RUN make -ENTRYPOINT ["/usr/local/src/probreach/bin/ProbReach"] +COPY bin/ProbReach /usr/local/bin/ProbReach +#ENTRYPOINT ProbReach diff --git a/dockerbuild/Dockerfile b/dockerbuild/Dockerfile new file mode 100644 index 00000000..00b65fb6 --- /dev/null +++ b/dockerbuild/Dockerfile @@ -0,0 +1,9 @@ +FROM dreal/dreal3-build +MAINTAINER Fedor Shmarov +VOLUME /usr/local/src/probreach/src +VOLUME /usr/local/src/probreach/bin +RUN apt-get -y install libgsl0-dev +RUN mkdir -p /usr/local/src/probreach/build/release +WORKDIR /usr/local/src/probreach/build/release +COPY build.sh . +ENTRYPOINT /bin/bash build.sh diff --git a/dockerbuild/build.sh b/dockerbuild/build.sh new file mode 100644 index 00000000..a3068aa9 --- /dev/null +++ b/dockerbuild/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cmake ../../src +make diff --git a/CMakeLists.txt b/src/CMakeLists.txt similarity index 97% rename from CMakeLists.txt rename to src/CMakeLists.txt index a9b7d960..02653061 100644 --- a/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,8 +11,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -Wno-sign-compare -Wno-unused- set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # setting some environment variables -set(PROBREACH_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src) -set(PROBREACH_BINARY_DIR ${PROJECT_SOURCE_DIR}/build/release) +set(PROBREACH_SOURCE_DIR ${PROJECT_SOURCE_DIR}) +set(PROBREACH_BINARY_DIR ${PROJECT_SOURCE_DIR}/../build/release) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROBREACH_BINARY_DIR}) # checking if dReal binary is set