Skip to content

Commit 11a2f4a

Browse files
update
1 parent 2c7e4ce commit 11a2f4a

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

episodes/00-setup.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ exercises: 2
66

77
:::::questions
88
- How to install RAT-PAC2 on various systems?
9+
:::::
10+
911
::::::::::::::::::::::::::::::::::::: objectives
1012

1113
- Know how to run ratpac2 via a container.
@@ -20,7 +22,7 @@ Installing ratpac2 via containers is the easiest and most reproducible method of
2022
#### Linux
2123
Apptainer (formerly Singularity) can be easily installed in any linux system through a package manager. In most shared clusters, it should already be installed.
2224
You can most likely install apptainer via:
23-
```
25+
```sh
2426
apt install apptainer # ubuntu
2527
dnf install apptainer # fedora or rhel/alma9
2628
pacman -S apptainer # arch linux
@@ -35,15 +37,15 @@ MacOS is not supported by Apptainer. You can either read along to find the manua
3537

3638
### Running RAT from a container directly
3739
We provide a container with the latest version of RAT-PAC2 built in. You can download the container via:
38-
```
40+
```sh
3941
apptainer pull ratpac-two.sif docker://ratpac/ratpac-two:nightly
4042
```
4143
Afterwards, you can enter the container by running:
42-
```
44+
```sh
4345
apptainer run ratpac-two.sif
4446
```
4547
which will drop you into a shell with rat installed. Or, if you can run rat directly by using:
46-
```
48+
```sh
4749
apptainer run ratpac-two.sif rat macro_to_run.mac ...
4850
```
4951
::::::::::::::::::::::::::::::::::::: caution
@@ -55,29 +57,29 @@ There's some known issues with this way of running rat. Notably, it is very like
5557
We also provide a container with all the dependencies required to compile RAT-PAC2 installed. This is the recommended way of installing RAT for the purpose of developing rat or poking around the code in general.
5658

5759
First, make sure you clone the code repository:
58-
```
60+
```sh
5961
git clone git@github.com:rat-pac/ratpac-two.git
6062
```
6163
Pull the following container instead:
62-
```
64+
```sh
6365
apptainer pull ratpac-two-base.sif docker://ratpac/ratpac-two:latest-base
6466
```
6567
Afterwards, enter the container:
66-
```
68+
```sh
6769
apptainer run ratpac-two-base.sif
6870
```
6971
By default, apptainer should have mounted your current directory into the container. You can quickly check this by making sure that all the files in this container is still there by running `ls`.
7072

7173
At this point, you can double check that all the dependencies are indeed included in your current shell. Namely, you can run `which root` and `which geant4-config`. Both of them should point somewhere in `/rapac-setup/local`.
7274

7375
If all goes well, you can then compile RAT-PAC2 following the standard compilation procedure:
74-
```
76+
```sh
7577
cd ratpac-two
7678
make # add -j $(nproc) if you would like to compile on multiple cores (recommended).
7779
source ratpac.sh
7880
```
7981
You can test that your installation is functional by running:
80-
```
82+
```sh
8183
rat macros/validation/electron.mac
8284
```
8385
A simulation should be performed, and rat should exit with no error. You should now see a log file as well as `output.root` in your directory. Congratulations, you now have a working version of RATPAC2!

0 commit comments

Comments
 (0)