for compiling `SpiRITROOT` ( `2024Spring` branch), used in the SpiRIT TPC experiment at RIKEN.
1.0K
This repository provides a Docker image for compiling a specific branch of SpiRITROOT--2024Springā , used in the SpiRIT TPC experiment at RIKEN.
Due to the incompatibility of several outdated dependencies, installing these on modern Linux distributions such as Ubuntu 22.04 or 24.04 is challenging. This Docker image replicates the working setup from Hokusai HPC at RIKEN, starting with a base image of RockyLinux 8.8ā .
Before using this repository, ensure you have the following:
Dockerā , if you have root privileges.
[Optional] Singularity, typically pre-installed on HPC systems as an alternative to Docker
Clone the SpiRITROOT repository:
git clone -b 2024Spring https://github.com/SpiRIT-Collaboration/SpiRITROOT
docker pull tck199732/spiritroot:latest
docker run -it -v ${host_dir}:${container_dir} tck199732/spiritroot
${host_dir} with the path to the SpiRITROOT directory on your machine.${container_dir} with the desired mount point inside the container (e.g., /root/SpiRITROOT).SpiRITROOT generates a file VERSION.compiled which indicates the compiled version of SpiRITROOT formatted according to git commits and branch being used. To access these information, one must navigate to the ${container_dir} and rungit config --global --add safe.directory $(pwd)
# in the SpiRITROOT directory
mkdir -p build
cd build
cmake .. -DCMAKE_CXX_COMPILER=g++ \
-DROOT_CONFIG_EXECUTABLE=${SIMPATH}/bin/root-config \
-DROOT_CINT_EXECUTABLE=${SIMPATH}/bin/rootcint \
-DEigen3_DIR=$Eigen3_DIR
make -j4
config.sh filesource config.sh
Expected output:
[root@e79fa05ae8ee build]# . config.sh
System during compilation: Rocky Linux release 8.10 (Green Obsidian)
x86_64
System now : Rocky Linux release 8.10 (Green Obsidian)
x86_64
[root@e79fa05ae8ee build]#
chown -R ${USER}:${USER} SpiRITROOT
It is hard to use Docker without root privileges, especially on HPC. Instead, (Singularity)[https://sylabs.io/singularity/ā ] users an alternative way to use Docker imagesā . To check if singularity command is available, do the following:
user@server $ singularity --version
singularity-ce version 3.11.4-1.el8
user@server $ singularity build image.sif docker://tck199732/spiritroot
INFO: Starting build...
Getting image source signatures
...
INFO: Creating SIF file...
INFO: Build complete: image.sif
This process usually takes a few minutes. You will probably see a lot of warning message warn rootless{opt/root/lib/libASImage.so} ignoring (usually) harmless EPERM on setxattr "user.rootlesscontainers but it probably does not affect its functionality. An file named image.sif is now generated.
SpiRIROOT, prepare a script for the procedures, i.e.#!/bin/bash
# compile.sh
mkdir -p build
cd build
cmake .. -DCMAKE_CXX_COMPILER=g++ \
-DROOT_CONFIG_EXECUTABLE=${SIMPATH}/bin/root-config \
-DROOT_CINT_EXECUTABLE=${SIMPATH}/bin/rootcint \
-DEigen3_DIR=$Eigen3_DIR
make -j4
cd ..
and make it an executable and finally run it with singularity
chmod +x ./compile.sh
singularity exec image.sif ./compile.sh
user@server $ singularity exec --bind ${host_dir}:${container_dir} ./ana.sh
Content type
Image
Digest
sha256:db63a62feā¦
Size
4.5 GB
Last updated
almost 2 years ago
docker pull tck199732/spiritroot