Installation

What you need

Python

3.11, 3.12 or 3.13

uv

0.11 or newer; it manages the environments and the lock files

Git

to clone the repository

Docker

only if you intend to build container images

The runtime itself depends on NumPy and rasterio and nothing else. In particular it depends on no deep learning framework: a model brings its own, or none at all.

Clone and set up

git clone https://github.com/SInApSE-INPE/nowcast-platform.git
cd nowcast-platform
uv sync

That creates the workspace environment, which holds the shared runtime and its development tools.

How the workspace is laid out

.
├── packages/nowcast-runtime/   the shared runtime
├── models/inceptionv4/         a real model that runs on it
├── docs/                       this documentation, and the decision records
└── pyproject.toml              the uv workspace, covering packages/ only

Important

Models are deliberately not workspace members. Each keeps its own uv.lock, so a CPU-only deployment and a CUDA one can coexist without either dictating the other’s build of torch. The practical consequence is that the runtime and each model are installed and checked separately, with two sets of commands rather than one.

The reasoning is in ADR 0002.

Run the checks

The shared runtime, from the workspace root:

uv run pytest
uv run ruff check packages
........................................................................ [ 64%]
.......................................                                  [100%]
111 passed in 5.99s

A model, from its own project:

uv sync --locked --python 3.12 --project models/inceptionv4
uv run --directory models/inceptionv4 pytest
uv run --directory models/inceptionv4 ruff check src tests tools deploy

One ruff configuration lives at the workspace root and governs every package and model, so lint rules cannot drift between them.

Tests that skip, and why

Some tests skip rather than fail, because they cannot run everywhere and a suite that always shows failures teaches people to ignore failures:

bundle files are not present / inceptionv4.pth is not present

Weights are large and kept out of Git, so a fresh clone has none. Every test that needs them skips and names the missing file. For InceptionV4, fetch them with uv run inceptionv4-download-artifacts from models/inceptionv4; for IRENE, with uv run irene-download-artifacts --bundle artifacts/v1 from models/irene. Only an absent file skips: one that is present with the wrong checksum is still an error.

reference/ assets are not in the repository

Two InceptionV4 tests compare against the supplied training reference, which is not redistributed. They run only where those files are present.

symlinks unavailable on this platform

One cache-retention test creates a symbolic link. Windows grants that only with a privilege or with Developer Mode enabled.

Building the documentation

uv sync --group docs
uv run --group docs sphinx-build -b html docs docs/_build/html

Open docs/_build/html/index.html. To regenerate the figures from a real pipeline run:

uv run --group docs python docs/_scripts/make_figures.py

Known environment problems

Windows: pytest cannot create its temporary directory

If every test errors with PermissionError: [WinError 5] pointing at %TEMP%\pytest-of-<you>, a stale directory from an earlier run has broken permissions. From an elevated terminal:

takeown /F "$env:TEMP\pytest-of-$env:USERNAME" /R /D Y
Remove-Item -Recurse -Force "$env:TEMP\pytest-of-$env:USERNAME"

As a workaround without elevation, pass --basetemp somewhere writable.

Container builds failing on TLS errors

A build that fails with DECRYPTION_FAILED_OR_BAD_RECORD_MAC or cannot decrypt peer's message while downloading a large wheel is hitting a network problem inside the Docker build network, not a problem with the Dockerfile. The host reaching the same index proves nothing, because the build uses its own network namespace. Retry; if it persists, look at MTU or VPN settings in your Docker installation.

Next

Quickstart generates a working model and publishes a forecast in about five minutes.