Linux — Install Everything at Once

← Back to Linux Installation

If you don’t want to think about which pieces you need and just want all of JuSPICE’s features working right away — every image-analysis method, every deep-learning model, every file format reader, plus IOPaint and NASA MicroNet each in their own dedicated environment — run the commands below from a bash/zsh terminal, in order:

git clone https://jugit.fz-juelich.de/iet-1/juspice.git
cd juspice
uv venv venvs/.venv --python 3.12
source venvs/.venv/bin/activate
uv sync --all-extras --active

UV_PROJECT_ENVIRONMENT=venvs/.venv_iopaint uv sync --python 3.12 --only-group iopaint --no-install-project

UV_PROJECT_ENVIRONMENT=venvs/.venv_micronet uv sync --python 3.12 --extra dl
uv pip install --python venvs/.venv_micronet/bin/python \
    git+https://github.com/nasa/pretrained-microscopy-models

Heads up: this downloads a large amount of software — deep-learning libraries such as PyTorch and TensorFlow are several hundred megabytes each, and this sets up three separate environments (venvs/.venv, venvs/.venv_iopaint, venvs/.venv_micronet), so expect this to use around 6-7 GB of disk space for the libraries alone (see the disk-space note below for what each feature additionally downloads the first time you use it) and take a while on a normal internet connection. In exchange, once it finishes you have everything ready to go — no extra installation steps later, no matter which notebook or feature you try. If disk space is limited, or you’d rather understand what you’re installing and add pieces one at a time, see the step-by-step installation instead — it installs a small core first and lets you add exactly the extra features you need.

This command reads a file called uv.lock, which is included in the JuSPICE repository and records the exact version of every package that is known to work together. That means everyone who runs this command gets an identical, reproducible setup, rather than whatever happens to be newest on the day they install it. If you’re contributing to JuSPICE and change pyproject.toml (the file that lists which packages JuSPICE depends on), run uv lock afterwards to keep uv.lock in sync with it.

venvs/.venv_iopaint and venvs/.venv_micronet are kept separate from venvs/.venv because IOPaint and MicroNet each pin their own, incompatible versions of shared packages (diffusers/ huggingface_hub/torch, and segmentation-models-pytorch/ timm respectively) — all three environments’ exact package versions are recorded in this same uv.lock file, without any of them ever getting mixed together.

See also