Installation
This guide covers the installation of ProMis and its dependencies.
Prerequisites
Before installing ProMis, you need to set up your environment.
Python
ProMis requires Python 3.10 or newer. You can download it from python.org.
Probabilistic Logic Backend
ProMis relies on a modified version of the ProbLog inference engine that supports distributional clauses. This is not available on PyPI and must be installed directly from a specific Git repository. The installation commands below include this step.
Optional Dependencies
GUI: To use the graphical user interface, you will need Node.js.
Nautical Charts: To work with nautical chart data (e.g., from S-57 files), GDAL is required. GDAL can be tricky to install, but here are some tips for common platforms:
# Ubuntu / Debian sudo apt-get update sudo apt-get install python3-gdal libgdal-dev # macOS (using Homebrew) brew install gdal
For other systems, please refer to the official GDAL documentation.
Standard Installation
This is the recommended method for most users. It installs the latest stable version of ProMis from PyPI and the required ProbLog backend from GitHub.
1# 1. Install ProMis from PyPI
2pip install promis
3
4# 2. Install the required ProbLog version
5pip install git+https://github.com/simon-kohaut/problog.git@dcproblog_develop
If you plan to work with nautical charts, install the necessary extras. Make sure you have installed GDAL first (see Prerequisites).
1pip install "promis[nautical]"
Developer Installation
If you want to contribute to ProMis, you should clone the repository and install it in editable mode. This allows you to modify the code and see your changes immediately.
1# 1. Clone the repository
2git clone git@github.com:HRI-EU/ProMis.git
3cd ProMis
4
5# 2. Install in editable mode with development and documentation dependencies
6pip install -e ".[dev,doc]"
7
8# 3. Install the required ProbLog version
9pip install git+https://github.com/simon-kohaut/problog.git@dcproblog_develop
To also include dependencies for nautical applications, add the nautical
extra:
1pip install -e ".[dev,doc,nautical]"
Docker
We provide a Docker setup for a containerized development environment, which ensures all dependencies are handled correctly.
Using VS Code Dev Containers
The easiest way to get started is by using VS Code’s Dev Containers extension. Simply open the cloned repository in VS Code and, when prompted, click “Reopen in Container”. This will automatically build the Docker image and configure your environment.
Manual Docker Build
If you prefer to manage Docker manually, you can build and run the container from your terminal.
1# Build the Docker image
2docker build . -t promis
3
4# Run the container with the local source code mounted.
5# This allows you to edit files on your host machine and run them inside the container.
6docker run -it --rm -v "$(pwd)":/workspaces/ProMis -w /workspaces/ProMis promis bash