From 11bb67915adddbc22b96953952be08347673f9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Wed, 28 Aug 2024 13:43:25 +0200 Subject: [PATCH] Add Dockerfile as alternative to local python/pip --- Dockerfile | 5 +++++ README.md | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..efc8e96d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:latest +WORKDIR /polar +COPY . . +RUN pip install -r requirements.txt +ENTRYPOINT ["python", "polar.py"] diff --git a/README.md b/README.md index d65a5870..f5c293a0 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,22 @@ source .venv/bin/activate pip install -r requirements.txt ``` +Alternatively, build Polar as a Docker container using the provided `Dockerfile`. + +1. Clone the repository: + ```bash + git clone git@github.com:probing-lab/polar.git + cd polar + ``` +2. Build the Docker container. + ```bash + docker build . -t polar + ``` +3. Execute the container. + ```bash + docker run --rm -v "$(pwd):$(pwd)" polar documentation/loops/loop.prob --goals "E(x)" + ``` + ## Supported Loops The problems Polar can solve are uncomputable for arbitrary probabilistic loops. This means that an algorithm and a