Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ShipSoft/FairShip/llms.txt

Use this file to discover all available pages before exploring further.

FairShip can be installed three ways, and the right choice depends on where you are working. Pixi is the simplest path on any modern Linux machine and manages every dependency automatically. On CERN’s lxplus cluster, building against pre-compiled libraries from CVMFS is fastest. If you have neither pixi nor CVMFS available, a fully local aliBuild covers the remaining cases. All methods ultimately produce the same runtime environment with the same macro entry points.
FairShip uses git-lfs to store large files such as magnetic field maps. If you have never used git-lfs on your account, run git lfs install once before cloning — otherwise those files will be missing and geometry initialisation will fail.

Key Dependencies

Whichever installation method you choose, the following core packages are required. These versions are tracked in pixi.toml and the aliBuild release defaults:
PackageMinimum version
ROOT≥ 6.38
Geant4≥ 11.3
Pythia8≥ 8.312
FairRoot≥ 19.0
GenFit≥ 2.3
EvtGen≥ 2.2

Pixi reads the pixi.toml and activate.sh already present in the repository and resolves every dependency from the ship channel on prefix.dev and conda-forge. No manual environment management is needed.
The pixi project root must be the FairShip clone itself. The activate.sh script exports FAIRSHIP, GEOMPATH, and related variables to PIXI_PROJECT_ROOT, which must point to the directory that contains the geometry/ and files/ sub-directories. Do not run pixi from a parent directory.
1

Install pixi

Follow the official pixi installation guide. On most systems this is a single curl command that places the pixi binary in ~/.pixi/bin.
2

Clone the repository

git clone https://github.com/ShipSoft/FairShip.git
cd FairShip
If you have not used git-lfs before:
git lfs install
git lfs pull
3

Build FairShip

pixi run build
This runs the full CMake configure → build sequence defined in pixi.toml. On first run pixi also downloads and installs all declared conda dependencies into an isolated environment under .pixi/.
4

Run a command

Prefix any command with pixi run to execute it inside the activated environment:
pixi run python macro/run_simScript.py --tag my-simulation
Or drop into an interactive shell for the whole session:
pixi shell
python macro/run_simScript.py --tag my-simulation

Using the Pre-Built Package

If you do not need to modify the C++ source, you can use the pre-built fairship package from the ship channel. You still need the clone for the geometry/ and files/ directories:
git clone https://github.com/ShipSoft/FairShip.git
cd FairShip
pixi add fairship
pixi run python macro/run_simScript.py --tag my-simulation
pixi add fairship appends fairship to pixi.toml under [dependencies] and fetches the pre-built binary, skipping the CMake build entirely.

Docker

Docker is not the recommended way to run FairShip locally, but it is useful for reproducible, stateless environments — for example in HTCondor batch jobs or when strict isolation from the host is required.
# Build the image
git clone https://github.com/ShipSoft/FairShip.git
cd FairShip
docker build -t fairship .

# Run interactively
docker run -i -t --rm fairship /bin/bash

# With graphics forwarding and a mounted working directory
docker run -i -t --rm \
  -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /local_workdir:/image_workdir \
  fairship /bin/bash

Troubleshooting

Consult the FAQ and common issues page on the FairShip wiki for solutions to frequently encountered problems. For issues specific to a particular CVMFS release, open an issue in the cvmfs_release repository.

Build docs developers (and LLMs) love