Installation¶
Packaging, installer tiers, frozen app policy, and release artifact rules are documented in Packaging and Distribution.
Annolid currently exposes two main commands after install:
annolid: launch the desktop GUIannolid-run: run model and workflow plugins from the terminal
Annolid requires Python 3.10 or newer and supports Python 3.10 through 3.15 for the default GUI/core workflow. In practice, Python 3.11 or 3.12 remains the safest default for new shared lab environments.
Recommended Paths¶
One-line installer¶
For most users, start with the project installers:
- macOS and Linux:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash
- Windows PowerShell:
irm https://raw.githubusercontent.com/healthonrails/annolid/main/install.ps1 | iex
See One-Line Installer for flags, extras, CPU/GPU choices, and non-interactive installs.
The one-line installers also validate ONNX Runtime provider selection. On Linux and Windows, onnxruntime-gpu is installed when an NVIDIA driver reports CUDA 12.x or newer, including CUDA 13.x driver reports; otherwise Annolid uses CPU onnxruntime. On macOS, ONNX acceleration uses CoreML when available rather than a CUDA GPU wheel.
Named installer profiles keep common setups reproducible:
minimal/gui(default): lean desktop GUI and annotation shell (PySide6-Essentials); large optional ML, tracking, and embedded viewer packages install on demand when first usedtracking: GUI plusml,tracking,cutiepre-installed upfrontworkstation: GUI plusml,tracking,cutie,sam3,training,webengine,pdffull: GUI plus theallextra
Example workstation install:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash -s -- --profile workstation
For a non-interactive CPU baseline, use:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash -s -- --no-gpu --no-interactive
On Windows PowerShell:
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/healthonrails/annolid/main/install.ps1))) -NoGpu -NoInteractive
Launch and update without activating an environment¶
After a successful one-line venv installation, open the install folder:
| Platform | Launch | Upgrade |
|---|---|---|
| macOS | Double-click Launch Annolid.command |
Double-click Update Annolid.command |
| Windows | Double-click Launch Annolid.cmd |
Double-click Update Annolid.cmd |
| Linux | Open Launch Annolid.desktop |
Open Update Annolid.desktop |
Linux file managers may require marking the .desktop file as trusted or allowing
it to launch. The adjacent Launch Annolid.sh and Update Annolid.sh can also be
run from a terminal. Shortcuts remain in the install folder; you can create an
alias/link to them on your desktop. Keep Windows .cmd files next to their
matching .ps1 files. No administrator access or global PATH change is needed
for shortcut generation. Conda installs continue to use conda activate annolid-env.
Before updating, save your annotations and close Annolid. The update shortcut asks you to continue, then reruns the installer with the same environment path, profile, extras, and CPU/GPU preference. It updates the checkout's current tracking branch using a fast-forward-only Git pull and reinstalls package requirements in the existing environment. This follows the source branch, not a pinned release channel. Network access is required. Non-interactive installs and updates finish without opening the GUI; use the launch shortcut afterward.
Updates stop on tracked local edits, divergent Git history, or a failed pull.
Commit or stash your code edits, or resolve the reported Git/network problem,
then rerun. Existing directories that are not Annolid checkouts are refused rather
than deleted. An invalid existing environment is also refused rather than replaced;
repair it or select a different --venv-dir / -VenvDir. Annotation files and
user settings are not deliberately rewritten by these installer steps.
These are source-install shortcuts, not a signed native installer or an atomic updater. If dependency installation fails after Git updates, the checkout may already be updated and the environment may be partly changed; review the terminal error and rerun after resolving it. There is no automatic rollback. Frozen desktop archives retain their separate bundle contract.
Local .venv with uv¶
For development or reproducible local work, use uv and a repository-local .venv:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[gui]"
The dedicated guide is uv Setup.
If you want ONNX Runtime GPU support in a manual uv environment on Linux or Windows, install Annolid first and then add the GPU wheel:
uv pip install --upgrade --force-reinstall onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
python -c "import onnxruntime as ort; print(ort.get_available_providers())"
pip / venv¶
If you prefer standard Python tooling:
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install "annolid[gui]"
To install from source:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
pip install -e ".[gui]"
Conda¶
Conda works well when you want isolated environment management plus FFmpeg and Git from conda-forge. Annolid ships conda-forge-only (nodefaults) environment manifests that delegate Python package resolution to pyproject.toml extras so Conda and pip never clash on Qt or OpenCV:
| Manifest | Environment name | Included extras | Best for |
|---|---|---|---|
environment.yml |
annolid-env |
.[gui] |
Default lean desktop GUI + CLI |
environment_no_GPU.yml |
annolid-env |
.[gui,onnx,scientific] |
CPU-only workstation |
environment_gpu.yml |
annolid-gpu |
.[gui,ml,tracking,cutie,training] |
GPU tracking and training workstation |
environment_dev.yml |
annolid-dev |
.[gui,test] + lint and docs tools |
Contributors, CI parity, and docs |
From a repository checkout:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
conda env create -f environment.yml
conda activate annolid-env
Or create an environment manually from conda-forge:
conda create -n annolid-env -c conda-forge --override-channels python=3.11 pip ffmpeg git
conda activate annolid-env
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
pip install -e ".[gui]"
Docker¶
Annolid ships a multi-target docker/Dockerfile and docker/compose.yaml built from your local repository checkout (with .dockerignore excluding local secrets, virtual environments, and model weights). All stages run as a non-root user without passwordless sudo.
Build from the repository root:
# Lean desktop GUI image (default, PySide6-Essentials)
docker build -f docker/Dockerfile -t annolid:gui .
# Headless CLI image (`annolid-run` for batch processing, servers, and CI)
docker build -f docker/Dockerfile --target headless -t annolid:headless .
# NVIDIA CUDA GPU workstation image (PyTorch >=2.5 + CUDA 12.4 + tracking + GUI)
docker build -f docker/Dockerfile --target gpu -t annolid:gpu .
Run workflows with Docker Compose profiles:
# Headless CLI (`annolid-run`)
docker compose -f docker/compose.yaml --profile cli run --rm annolid-cli list-models
# Linux X11 desktop GUI (revoke X11 access after closing)
xhost +local:docker
ANNOLID_DATA_DIR=/path/to/videos docker compose -f docker/compose.yaml --profile gui run --rm annolid-gui
xhost -local:docker
# NVIDIA CUDA GPU workstation
ANNOLID_DATA_DIR=/path/to/videos docker compose -f docker/compose.yaml --profile gpu run --rm annolid-gpu annolid-run list-models
Pass --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) (or set ANNOLID_UID / ANNOLID_GID for Compose) on Linux so files written inside /workspace match your host user ownership. For Annolid Bot's Docker-isolated shell tool, see Sandboxed Shell.
Optional Extras¶
Useful extras currently defined in pyproject.toml include:
gui: lightweight Qt desktop bindings (PySide6-Essentials)webengine: Qt WebEngine add-ons (PySide6-Addons) for embedded PDF.js, Three.js 3D, and web dashboardsonnx: ONNX Runtime for interactive SAM, TapNext, and VideoMT inferencescientific:scipy,scikit-learn, andscikit-imagefor clustering, PCA, and morphologypdf:pymupdffor PDF rendering and page importmodel_downloads:gdownhelper for Google Drive hosted checkpointsml: general ML/model runtime dependencies such as PyTorch, Transformers, Hugging Face Hub, ONNX Runtime, Hydra/OmegaConf, and COCO toolingtest: dependencies needed to import and run the default test collectionaudio: audio loading/playback helpers (librosa,sounddevice)ai_chat: OpenAI-compatible and Anthropic SDKs for hosted LLM providerstraining: TensorBoard support for training dashboards and projector viewsyolo: Ultralytics YOLO/YOLOE workflows and tracker matching helperscutie: Cutie video object segmentation tracking runtimetracking: common tracking workstation runtime, including PyTorch, ONNX Runtime, Cutie-style config dependencies, and YOLO matching helpersrealtime: serial and ZMQ dependencies for realtime/hardware integrationsonnx_gpu: Windows/Linux ONNX Runtime CUDA providerlarge_image: TIFF/OME-TIFF metadata and optional streaming backends (tifffile,pyvips,openslide-python)sam3: SAM3-related dependenciesimage_editing: diffusion/image-editing featurestext_to_speech: read-aloud and narration featuresqwen3_embedding: embedding-related utilitiesmediapipe: MediaPipe-based workflowscowtracker: CowTracker backend dependencyremote_video: network/remote video decoding throughffpyplayersleap: SLEAP HDF5 (.slp/.h5) annotation import support (h5py)annolid_bot: Annolid Bot integrations such as MCP, Playwright, WhatsApp bridge support, and Google Drive/Calendar dependenciesbot: Annolid Bot integrations plus memory dependenciesmemory: vector database dependencies for fast Annolid Bot memoryall: convenience profile for full-feature workstations
Example:
pip install -e ".[gui,sam3,yolo,training,ai_chat]"
Annolid's base package includes pycocotools so mask/RLE polygon paths are
available in default installs. Both pip install "annolid[gui]" and the one-line
installer's default gui profile keep the initial download small and fast. When
you first launch an optional model, tracker, or embedded viewer in a writable
Python environment, Annolid prompts with a non-blocking runtime installer (or
installs on demand via annolid-run). You can also manage optional runtimes at
any time from Settings → Runtime & Optional Packages… or from the CLI:
annolid-run runtime status
annolid-run runtime check
annolid-run runtime profiles
annolid-run runtime install tracking sam3
Air-Gapped and Offline Lab Machines¶
For offline or air-gapped workstations, export a self-contained, SHA256-checksummed wheelhouse bundle on an online machine with the matching OS/architecture (or explicit --python-version / --platform), transfer the folder, verify its checksums, and install with --offline:
# 1. On an online machine: export binary wheels + wheelhouse-manifest.json
annolid-run runtime bundle --profile workstation --out ./annolid-wheelhouse
# 2. On the air-gapped machine: verify SHA256 manifest and install without network access
annolid-run runtime verify-bundle ./annolid-wheelhouse
annolid-run runtime install --profile workstation --wheelhouse ./annolid-wheelhouse --offline
You can also browse to the wheelhouse folder in Settings → Runtime & Optional Packages… (or set ANNOLID_WHEELHOUSE=/path/to/annolid-wheelhouse and ANNOLID_OFFLINE=1), or bootstrap an existing local checkout offline with ./install.sh --install-dir /path/to/annolid --wheelhouse /path/to/annolid-wheelhouse --offline (.\install.ps1 -InstallDir C:\annolid -Wheelhouse C:\annolid-wheelhouse -Offline on Windows).
SAM-related packages, hosted AI providers, realtime hardware, large-image backends, Bot integrations, audio helpers, image editing, and text-to-speech remain explicit extras. If one of those features is not installed, Annolid should start normally and show an install hint when that feature is opened.
The one-line installers also keep optional SAM-HQ out of the default path.
SAM-HQ is attempted only when a SAM-related extra such as sam3 or the all
profile is selected. This avoids a default GitHub source install on machines
that only need the GUI/core annotation workflow.
Cutie tracking is also repairable from a minimal install. If a user starts
Cutie tracking and one of the Cutie runtime packages is missing, Annolid
attempts to install the missing packages into the active environment and then
continues loading the tracker. Set ANNOLID_AUTO_INSTALL_CUTIE_DEPS=0 to
disable automatic installation and show the exact python -m pip install ...
command instead.
Note on large_image¶
large_image is optional. A normal annolid[gui] install does not require these dependencies, and Annolid's standard image/video annotation workflows continue to work without them.
The large_image extra installs the Python packages, but some platforms also need native runtimes for the fastest backends:
pyvipsneeds a workinglibvipsruntimeopenslide-pythonneeds a working OpenSlide runtime
If those native libraries are missing, Annolid falls back to tifffile when available. If the full large_image extra is not installed, Annolid still starts normally and falls back to the standard Qt/Pillow image path instead of requiring large-image packages at startup.
Note on remote_video¶
remote_video is optional. Annolid's default install does not require ffpyplayer, which keeps Python 3.14+ installs from failing when no compatible ffpyplayer wheel is available. Install it only if you use Annolid's network/remote video decoding path:
pip install -e ".[remote_video]"
On Python 3.14 and 3.15, ffpyplayer may build from source and require native FFmpeg development headers such as libpostproc.
Note on Python 3.15+ Wheel Coverage¶
On Python 3.10 through 3.14, h5py and scikit-image are included in the optional scientific, sleap, test, and all extras (and gated with python_version < "3.15" where applicable) so pip install "annolid[gui]" stays lean and never attempts native libhdf5 or Meson/C++ source builds before upstream cp315 wheels are available:
- Mask rendering, binary polygon rasterization, and shape skeletonization fall back automatically to OpenCV/SciPy when
scikit-imageis absent. - SLEAP
.slp/.h5import raises an explicit install hint whenh5pyis absent; installpip install "annolid[sleap]"(orpip install h5pywith HDF5 headers/wheels) if you need SLEAP HDF5 conversion on Python 3.15+.
Verify the Install¶
Run:
annolid --help
annolid-run --help
annolid-run runtime check
Launch the GUI:
annolid
List available model plugins:
annolid-run list-models
Common Post-install Notes¶
- Install FFmpeg if video import/export or codec support is incomplete.
- If ONNX Runtime GPU validation fails, activate the installer-created environment and rerun the repair command printed by the installer.
- If YOLO/YOLOE commands are missing, install
annolid[yolo]. - If hosted LLM providers are unavailable, install
annolid[ai_chat]. - If audio recording/playback is unavailable, install
annolid[audio]orannolid[text_to_speech]. - If you use Annolid Bot with MCP or browser automation, install the
annolid_botextra. - If
qtpy.QtBindingsNotFoundErrorappears, install theguiextra in the active environment. - The
guiextra now installsPySide6as the default Qt binding.