Installation

SPINE has two practical installation modes:

  • Container-first for full reconstruction, training, and inference workloads. This is the recommended way to run SPINE because the release-tagged SPINE image provides a compatible PyTorch ecosystem together with LArCV.

  • Local pip installation for post-processing, analysis, visualization, documentation, or development workflows that do not need the full ML stack.

Local pip Installation

Use a local pip installation when you only need post-processing, analysis, visualization, documentation, or lightweight development without the full PyTorch and LArCV runtime.

Core Package

For the minimal core package:

pip install spine

This installs the base Python dependencies declared in pyproject.toml. In practice, that includes the main numerical, tabular, configuration, and I/O packages used by SPINE, such as:

  • numpy

  • scipy

  • pandas

  • PyYAML

  • h5py

  • numba

  • numexpr

  • psutil

  • tqdm

Optional Python Extras

Machine Learning Models

Installing ML dependencies locally is possible, but it is not the preferred path for most users because the PyTorch ecosystem and LArCV compatibility are the hard part of getting SPINE running reliably.

If you do need to install model support outside the container:

pip install spine[model]

You may still need to manage PyTorch, torch-geometric, torch-scatter, torch-cluster, MinkowskiEngine, and CUDA compatibility yourself, which is why the released SPINE image remains the recommended runtime.

Visualization Tools

For analysis and visualization without the full ML stack:

pip install spine[viz]

Development Tools

For package development and documentation work:

pip install spine[dev]

All Dependencies

To install all optional Python extras from PyPI:

pip install spine[all]

This is useful for local post/ana/vis workflows, but it still does not replace the container as the recommended runtime for full SPINE jobs.

Python And Dependency Requirements

  • Python 3.10 or newer

  • The base dependencies installed by pip install spine

  • Optional extras depending on the workflow:

    • spine[viz] for plotting and visualization

    • spine[dev] for testing, formatting, packaging, and documentation

    • spine[all] for the union of the shipped Python extras

For GPU acceleration outside the container, you must ensure that CUDA-compatible PyTorch and the rest of the SPINE ML dependency stack are installed consistently.

Development From Source

For local development from source:

git clone https://github.com/DeepLearnPhysics/spine.git
cd spine
pip install -e .[dev]

If you are developing reconstruction or model code, doing this inside the released SPINE container is usually the lowest-friction setup.