Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container definitions #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# The recipe below implements a Docker multi-stage build:
# <https://docs.docker.com/develop/develop-images/multistage-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
10 changes: 10 additions & 0 deletions Singularity
Original file line number Diff line number Diff line change
@@ -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.