Skip to content

Commit 4e10b14

Browse files
authored
Merge pull request #561 from rest-for-physics/cris_add_install_script
Add interactive installation script and README
2 parents 118ed97 + 334812c commit 4e10b14

2 files changed

Lines changed: 774 additions & 0 deletions

File tree

scripts/installation/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Installation Scripts
2+
3+
Interactive installer for [REST-for-Physics](https://github.com/rest-for-physics/framework) and its dependencies.
4+
5+
## Quick start
6+
7+
```bash
8+
bash install_rest.sh
9+
```
10+
11+
The script is interactive and will guide you through each step.
12+
13+
## Install modes
14+
15+
### Mode 1 -- Server install
16+
17+
For machines where ROOT, Geant4 and Garfield++ are already available system-wide
18+
(e.g. the `titan` cluster at Zaragoza).
19+
20+
You will be asked for the path to the system `thisREST.sh` that loads the
21+
pre-installed environment. The script then clones, configures and builds only
22+
REST itself.
23+
24+
### Mode 2 -- Full install from source
25+
26+
For a fresh Ubuntu (22.04/24.04) or WSL system with nothing pre-installed.
27+
Builds everything from source:
28+
29+
| Package | Version |
30+
|---------------|----------------------------------|
31+
| ROOT | 6.26.10 |
32+
| Geant4 | 11.0.3 (with GDML + data) |
33+
| Garfield++ | pinned commit `a993c5eb` |
34+
| REST | latest from `master` |
35+
36+
System dependencies are installed via `apt` (requires `sudo`).
37+
If `sudo` is not available the script offers to skip this step, assuming
38+
packages are already present.
39+
40+
### Mode 3 -- CVMFS install
41+
42+
For HEP clusters where CERN's CVMFS is mounted (e.g. NAF-IAXO at DESY, RHEL 9).
43+
Instead of building the dependencies, the script loads a CERN **LCG view** from
44+
`/cvmfs` (providing ROOT, Geant4, GSL and Garfield) and builds only REST on top.
45+
This needs no `sudo` and survives OS upgrades far better than a hand-built stack.
46+
47+
You will be asked for the LCG view `setup.sh` (default: a tested el9 view,
48+
`LCG_109/x86_64-el9-gcc13-opt`). The script then sets up a small Garfield
49+
compatibility shim, clones REST, and builds it -- including `restG4` if Geant4
50+
integration is enabled.
51+
52+
On clusters where `$HOME` is on AFS (not writable in-session), the script sets
53+
`REST_HOME` to a writable location so REST's per-user `.rest` directory works.
54+
55+
## What the script does
56+
57+
1. Installs system packages (mode 2, optional)
58+
2. Downloads and builds ROOT, Geant4, Garfield++ (mode 2),
59+
or loads a CERN LCG view from `/cvmfs` (mode 3)
60+
3. Asks you to choose which REST libraries to enable
61+
4. Clones the REST framework and pulls submodules
62+
(also the `restG4` package when Geant4 integration is enabled)
63+
5. Configures and builds REST with CMake
64+
6. Tests the installation (`restRoot`)
65+
7. Optionally adds the environment setup to `~/.bashrc`
66+
(and ensures login shells source it, e.g. for SSH)
67+
68+
## Options asked during installation
69+
70+
- **Install directory** -- where REST source and build will live (default: `~/rest`)
71+
- **Libraries** -- all, a common subset, or pick individually
72+
- **Garfield++ / Geant4 integration** -- enable or disable
73+
- **Submodule strategy** -- `--latest` commits (default) or the `--clean`
74+
framework-recorded versions (pick `--clean` if a latest build fails to compile)
75+
- **Parallel jobs** -- capped at 16 for shared-server politeness
76+
77+
## Individual scripts (legacy)
78+
79+
The older per-package scripts are still available for reference:
80+
81+
- `installROOT.sh` -- ROOT 6.28.02
82+
- `installGeant4.sh` -- Geant4 11.0.3
83+
- `installGarfield.sh` -- Garfield++
84+
- `installRequiredSoftware.sh` -- system packages via `apt-get`
85+
86+
`install_rest.sh` supersedes all of them in a single guided workflow.
87+
88+
## Requirements
89+
90+
- **OS**: Ubuntu 22.04 / 24.04 (or WSL with either) for mode 2; any Linux with
91+
CERN CVMFS mounted for mode 3 (e.g. RHEL 9 / NAF). Other distros may work but
92+
the mode-2 `apt` package list would need adapting.
93+
- **Disk**: ~5 GB for a full build (ROOT + Geant4 + Garfield + REST)
94+
- **Tools**: `bash`, `git`, `python3`, `cmake`, `make`, `wget`

0 commit comments

Comments
 (0)