Installing RASER and Configuring the Related Environment on Fedora (En)

Albert Cheung

Foreword

Like Debian, Fedora is another distribution of the Linux system. RASER is software based on the Linux system, so it can also be directly deployed on the Fedora system.

Before deployment, please complete the network connection process for Fedora by yourself.

The following operations should all be performed as the root user. If you do not wish to make global changes, please create a new user:

  1. Create a new user
1
sudo useradd -m newusername

where newusername is the name of the new user you want to create. The -m parameter indicates that a home directory for the user will be created at the same time.

  1. Set a password
1
sudo passwd newusername

The system will prompt you to enter and confirm the password for the new user.

  1. Switch to the new user and perform subsequent operations
1
su - newusername

After entering the password, you will be switched to the new user in the terminal. Since the new user is not granted root privileges, changes made in some areas will not affect the settings of all users.

Configuring the Required Software or Environment

Python3 and GCC

  1. Update the system package list
1
sudo dnf update
  1. Install python3
1
sudo dnf install python3
  1. Check if python3 is successfully installed
1
python3 --version
  1. Sometimes, you may need to manually install the gcc package:
1
sudo dnf install gcc
  1. Check if gcc is successfully installed:
1
gcc --version

Apptainer

  1. Download and extract Apptainer:
1
2
3
wget https://github.com/apptainer/apptainer/releases/download/v1.3.3/apptainer-1.3.3.tar.gz
tar -xzf apptainer-1.3.3.tar.gz
cd apptainer-1.3.3
  1. Configure and compile the code:
1
2
./mconfig
make -C builddir
  1. Install Apptainer:
1
sudo make -C builddir install

or

1
sudo dnf install apptainer 
  1. Check the installed version:
1
apptainer --version

CVMFS

(For details, see https://cvmfs.readthedocs.io/en/stable/cpt-quickstart.html )

  1. Run:
1
2
sudo dnf install http://ecsft.cern.ch/dist/cvmfs/cvmfs-2.11.3/cvmfs{,-libs}-2.11.3-1.fc38.x86_64.rpm \
https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-latest.noarch.rpm
1
2
3
wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
sudo apt install -y ./cvmfs-release-latest_all.deb
sudo apt install -y cvmfs
  1. Configure AutoFS:
1
2
sed -i 's%#+dir:/etc/auto.master.d%+dir:/etc/auto.master.d%' /etc/auto.master
systemctl restart autofs
  1. Create default.local:
1
2
sudo mkdir -p /etc/cvmfs
sudo touch /etc/cvmfs/default.local
  1. Open the file for editing:
1
sudo nano /etc/cvmfs/default.local
  1. Write the following content:
1
2
3
CVMFS_REPOSITORIES=cvmfs-config.cern.ch,sft.cern.ch,geant4.cern.ch
CVMFS_CLIENT_PROFILE=single
CVMFS_HTTP_PROXY=DIRECT
  1. Verify the file system:
1
cvmfs_config probe

If the probe fails, you can restart autofs:

1
sudo systemctl restart autofs
  1. You can use the dnf command to check if CVMFS was successfully installed:
1
dnf list installed cvmfs

If successfully installed, you will see output similar to the following:

1
2
Installed Packages
cvmfs.x86_64 version-release @repository

ROOT

  1. Install the ROOT package:
1
dnf install root

However, more commonly, users need more than just the basic package. Click on one of the provided versions to view the full list of components at https://src.fedoraproject.org/rpms/root/ . For example, to install ROOT with Python and notebook support, run:

1
dnf install root python3-root root-notebook
  1. Check the version
1
root --version

Geant4

Please see Building and Installing Geant4 on Linux .

Testing

Download the files required for testing

Download links:

Among these files:

  • Virtual machine file: RASER_Debian.ova (not needed if running on Fedora)
  • RASER runtime image file: raser-2.2.sif
  • Other files: setup.sh, example.json

RASER Testing

  1. Create the tutorial directory:
1
2
mkdir -p ~/tutorial/{cfg,ext,img,paras,setting/{absorber,detector,electronics},tests}
cd ~/tutorial
  1. Copy the downloaded files to the tutorial directory:
1
2
3
cp /path/to/downloaded/setup.sh ~/tutorial/cfg/
cp /path/to/downloaded/example.json ~/tutorial/setting/detector/
cp /path/to/downloaded/raser-2.2.sif ~/tutorial/img/

where /path/to/downloaded/ is the location of the downloaded demo files.

  1. Clone the RASER project git repository using the git command:
1
git clone https://code.ihep.ac.cn/raser-team/raser.git
  1. Run the example:
1
2
3
source cfg/setup.sh
raser field gen_devsim_db
raser field -cv example
  1. Finally, you can check the output results in the subfolder (possibly named output).
  • Title: Installing RASER and Configuring the Related Environment on Fedora (En)
  • Author: Albert Cheung
  • Created at : 2024-07-25 21:41:07
  • Updated at : 2024-08-17 21:56:58
  • Link: https://www.albertc9.github.io/2024/07/25/Installing-RASER-and-Configuring-the-Related-Environment-on-Fedora/
  • License: This work is licensed under CC BY-NC-SA 4.0.