From 7643c4ba485484cb134f757f6f19c73fe5acce52 Mon Sep 17 00:00:00 2001 From: Jason Dekarske Date: Tue, 10 Aug 2021 11:41:55 -0700 Subject: [PATCH 1/2] Create Dockerfile --- Dockerfile | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a1b0565 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,70 @@ +# The recipe below implements a Docker multi-stage build: +# +############################################################################### +## First stage: an image to build the planner. +## +## We'll install here all packages we need to build the planner +############################################################################### +FROM ubuntu:16.04 AS builder +RUN apt-get update && apt-get install --no-install-recommends -y \ + git ca-certificates g++ make flex bison cmake doxygen libbz2-dev libgsl-dev libz-dev libboost1.58-all-dev libgmp3-dev libmpfr-dev m4 zlib1g-dev p7zip + +RUN git clone https://github.com/Z3Prover/z3.git /z3 \ + && cd /z3 \ + && git checkout tags/z3-4.8.8 \ + && mkdir build \ + && cd build \ + && cmake -G "Unix Makefiles" -DZ3_BUILD_LIBZ3_SHARED=FALSE ../ \ + && make -j4 \ + && make install + +RUN git clone https://github.com/bluescarni/mppp.git /mppp \ + && cd /mppp \ + && git checkout tags/v0.9 \ + && cmake -DMPPP_BUILD_STATIC_LIBRARY=ON . \ + && make \ + && make install + +RUN git clone https://github.com/bluescarni/piranha.git /piranha \ + && cd /piranha \ + && git checkout 7e42042 \ + && mkdir build \ + && cd build \ + && cmake ../ \ + && make install + +# RUN git clone https://github.com/KCL-Planning/SMTPlan.git /SMTPlan \ +# && cd /SMTPlan/SMTPlan \ +# && mkdir build \ +# && cd build \ +# && cmake .. \ +# && make + +COPY . /SMTPlan +RUN cd /SMTPlan/SMTPlan \ + && mkdir build \ + && cd build \ + && cmake .. \ + && make + +# RUN ldconfig /usr/local/lib +# CMD /bin/bash + +############################################################################### +## Second stage: the image to run the planner +## +## This is the image that will be distributed, we will simply copy here +## the files that we fetched and compiled in the previous image and that +## are strictly necessary to run the planner +############################################################################### +FROM ubuntu:16.04 +# # Install any package needed to *run* the planner +RUN apt-get update && apt-get install --no-install-recommends -y \ + libgmp3-dev libmpfr-dev \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /SMTPlan/SMTPlan/build/SMTPlan /SMTPlan + +RUN chmod +x ./SMTPlan + +CMD /bin/bash From 194f90d1b0052dcad43ee66f6b9d83c87c7aad23 Mon Sep 17 00:00:00 2001 From: Jason Dekarske Date: Tue, 10 Aug 2021 11:51:38 -0700 Subject: [PATCH 2/2] Add Singularity definition that depends on the included Dockerfile --- Singularity | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Singularity diff --git a/Singularity b/Singularity new file mode 100644 index 0000000..9a938ba --- /dev/null +++ b/Singularity @@ -0,0 +1,10 @@ +Bootstrap: docker +From: jdekarske/smt_plan + +%runscript +/SMTPlan $@ + +%labels +Name SMTPlan+ +Description An SMT based PDDL+ planner. +Authors Michael Cashmore, Maria Fox, Derek Long. Original Singularity file by Josef Bajada, modifications and packaging by Jason Dekarske.