Installing with uv & Python
lucem is packaged as a lean core wheel (numpy + CubeCL GPU operators + OME-Zarr I/O + @lucem.op tiled walker), with heavy features split into optional companion extras so your pyproject.toml stays clean and fast to resolve with uv.
Pick only what you need
Section titled “Pick only what you need”[project]name = "my-histology-study"requires-python = ">=3.12"dependencies = [ "lucem[web,hist,stardist]",]Or add from the terminal with uv:
uv add lucem # Core GPU ops, OME-Zarr I/O, @lucem.opuv add "lucem[web]" # + Browser WASM workstation (`lucem web`)uv add "lucem[app]" # + Native desktop workstation (`lucem app`)uv add "lucem[hist]" # + Histology: stain deconvolution, tissue, cellsuv add "lucem[stardist]" # + StarDist nuclei model pluginuv add "lucem[ml]" # + StarDist + SAM + InstanSeg pluginsuv add "lucem[all]" # EverythingEphemeral runs with uv run
Section titled “Ephemeral runs with uv run”Launch the browser viewer or inspect installed model plugins without creating a project:
uv run --with "lucem[web]" lucem web --openuv run --with "lucem[ml]" lucem pluginsLaunching the UI from Python
Section titled “Launching the UI from Python”import lucem
# Browser WASM app (pip/uv install "lucem[web]")lucem.web.serve(data="./slides", port=8080, open_browser=True)
# Native desktop workstation (pip/uv install "lucem[app]")lucem.app.open("./slides/sample.ome.zarr")