Skip to main content

CLI to install and run the LAI annotation stack via Docker Compose.

Project description

LAI

CI PyPI Docker

laivision.dk — project site, workflow overview, and tutorials.

Self-hosted computer vision studio: datasets, SAM-assisted annotation, training (YOLO / MMYOLO / RT-DETR), evaluation, and export.

Install a small CLI from PyPI, pull pre-built images from Docker Hub, and run everything with lai. No git clone required.

Tested on: Linux (Ubuntu) and Windows 10/11 (Docker Desktop + WSL2).


Requirements

Requirement Notes
OS Linux or Windows 10/11 (see platform notes below)
Docker Engine + Compose v2.24+ docker compose version must work
Python 3.10–3.12 For the lai CLI only — not for running the app itself
RAM 8 GB minimum · 16 GB+ recommended (32 GB with GPU tier)
Disk ~5 GB (CPU stack) · ~20–30 GB (GPU images + models)
Browser For lai install-gui and the studio UI
NVIDIA GPU (optional) Training, auto-annotate, SAM — GPU tier + Container Toolkit (Linux) or WSL2 GPU passthrough (Windows)

You do not need Node.js, a git checkout, or local image builds for the quick start.

Linux

  • Docker Engine + Compose plugin
  • Install CLI with pipx or a venv (recommended on Debian/Ubuntu — do not use system pip; PEP 668)

Windows

  • Docker Desktop with WSL2 backend
  • lai install-gui works in any browser; terminal lai install needs Git Bash or WSL
  • GPU tier: enable WSL2 integration in Docker Desktop and install NVIDIA drivers for WSL

Quick start

flowchart LR
  A["① pip install laivision"] --> B["② lai install-gui"]
  B --> C["③ lai up"]
  C --> D["④ lai download-models"]
  D --> E["Open localhost:8089"]

① Install the CLI

pip install laivision
# recommended:  pipx install laivision

Installs the lai command and embeds Docker Compose files inside the package. Your settings live in ~/.config/lai/.env (not in site-packages), so upgrades do not overwrite them.


② First-time setup

lai install-gui

Opens a browser wizard on http://127.0.0.1:… where you choose:

Setting Default Purpose
Data directory ~/lai-data Databases, datasets, projects, model cache
Web port 8089 UI in your browser
GPU tier off Enables worker-gpu + sam_service (NVIDIA required)
SAM 3 folder ~/lai-data/sam3-models Optional checkpoint path (SAM 2 works without it)

Terminal alternative: lai install or lai install --yes for non-interactive defaults.


③ Start the stack

lai up
  • Pulls images from Docker Hub (luluray/lai-*) if they are not local yet
  • Starts database, API, workers, and web UI
  • First run may take several minutes while images download

Open http://localhost:8089 (or the port you chose).

lai down          # stop containers
lai doctor        # version, Docker checks, bundle path
lai upgrade       # after pip install -U laivision

④ Download foundation models (optional, after stack is up)

lai download-models

Pre-downloads training and inference weights into your data directory ($LAI_DATA_DIR/models):

lai download-models --yolo yolov8n.pt      # single Ultralytics weight
lai download-models --mmyolo minimal         # MMYOLO pretrained checkpoints
lai download-models --depth minimal          # depth estimation ONNX

Without this step, many features still work; downloads happen on first use or you can run the commands above anytime.


Optional extras

SAM 3 — SAM 2 is included. For SAM 3, place a checkpoint (e.g. from Hugging Face) at the path from the wizard, then:

lai restart sam_service

GPU check (if GPU tier is enabled):

docker compose exec worker-gpu nvidia-smi

Where things live

Path Contents
~/.config/lai/.env Ports, data dir, Docker image tags
~/lai-data/ (default) Postgres/Redis/Mongo data, projects, models
PyPI package lai/bundle/ Read-only compose files (do not edit)

Advanced setup

Git checkout, building images locally, running tests, maintainer releases → see README_advanced.md.


License

AGPL-3.0 — bundled ML runtimes (YOLO, MMYOLO, SAM) have additional upstream licenses. Details in README_advanced.md#license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

laivision-0.1.2.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

laivision-0.1.2-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file laivision-0.1.2.tar.gz.

File metadata

  • Download URL: laivision-0.1.2.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for laivision-0.1.2.tar.gz
Algorithm Hash digest
SHA256 66307c219efa4ee1ba0b25bff029abc502046cdec7db90e0c6d69950f7279755
MD5 a658d7e10c12f9dfe71e246056657a96
BLAKE2b-256 a6586da4df50e4ac93d886cf8f0878d964a46fc447bfb95d501d3aa0fc6c8ed5

See more details on using hashes here.

File details

Details for the file laivision-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: laivision-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for laivision-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8217214e31889288306d85a484f641126dfa4164d8f98b8a4529d4bbdb16fa62
MD5 9463dd8c4ebfdf6cd232ab61c2fd04d8
BLAKE2b-256 ecf5640acf730a3c100950280d27d45abb208c0a21267ce6a542d321290f1869

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page