Skip to content

Installation

The project is managed with Poetry (dependencies, lock file, build of the package). The package can still be run from a plain virtual environment with python directly: Poetry is the reference, not a requirement at run time.

Python 3.10 to 3.13.

git clone https://github.com/<organisation>/sAIfety-UPM.git
cd sAIfety-UPM
poetry install                       # package + dev tools (pytest, ruff), from poetry.lock
poetry install --with docs           # + MkDocs, to build the documentation
poetry run sidenor-ladle --help

poetry install installs the package itself in editable mode, so a change of the code is used at once. poetry build produces a wheel and an sdist in dist/.

With a virtual environment and pip

python -m venv .venv
source .venv/bin/activate            # Windows: .venv\Scripts\activate
pip install -e .                     # or: pip install dist/sidenor_ladle-4.0.0-py3-none-any.whl
sidenor-ladle --help                     # or: python -m sidenor_ladle --help

Optional extra: automatic ladle-identity check

The identity check trains an image classifier and needs PyTorch. It is an optional extra on purpose: on the GPU virtual machine, torch is installed for the CUDA driver and must never be replaced by a dependency resolver.

poetry install -E identity           # or: pip install -e ".[identity]"

On the VM, keep the torch already installed and simply do not install the extra.

Static figures (Markdown and PDF reports)

HTML reports use interactive plotly charts and need nothing else. Markdown and PDF reports, and the PNG figure files written next to each step, use Kaleido, which needs a Chrome or Chromium browser:

plotly_get_chrome                    # downloads a private Chrome for Kaleido (once)

Without a browser, the pipeline still runs: a single warning is logged and the Markdown / PDF reports link to interactive HTML versions of the figures.

Private settings

cp .env.example .env                 # then edit; .env is in .gitignore
sidenor-ladle config validate

See Configuration and .env.