diff --git a/.github/halld_recon_build.sh b/.github/halld_recon_build.sh new file mode 100644 index 000000000..19810271e --- /dev/null +++ b/.github/halld_recon_build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "mounting cvmfs" +yum -y install fuse +chmod 666 /dev/fuse +mkdir -p /cvmfs/oasis.opensciencegrid.org +mount -t cvmfs oasis.opensciencegrid.org /cvmfs/oasis.opensciencegrid.org + +cd /workspace/halld_recon +ln -s /cvmfs/oasis.opensciencegrid.org/gluex/group /group +export BUILD_SCRIPTS=/group/halld/Software/build_scripts +source $BUILD_SCRIPTS/gluex_env_boot_jlab.sh --bs $BUILD_SCRIPTS +gxenv /workspace/JANA2/.github/halld_recon_build_prereqs_version.xml + +echo "rootsys" +echo $ROOTSYS +chmod +x $JANA_HOME/bin/* +cd src +scons install -j12 \ No newline at end of file diff --git a/.github/halld_recon_build_prereqs_version.xml b/.github/halld_recon_build_prereqs_version.xml new file mode 100644 index 000000000..9a43c1c81 --- /dev/null +++ b/.github/halld_recon_build_prereqs_version.xml @@ -0,0 +1,16 @@ + + + +Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities + + + + + + + + + + + + \ No newline at end of file diff --git a/.github/jana_build.sh b/.github/jana_build.sh new file mode 100644 index 000000000..5672f6d1b --- /dev/null +++ b/.github/jana_build.sh @@ -0,0 +1,26 @@ +#!/bin/bash +echo "mounting cvmfs" +yum -y install fuse +chmod 666 /dev/fuse +mkdir -p /cvmfs/oasis.opensciencegrid.org +mount -t cvmfs oasis.opensciencegrid.org /cvmfs/oasis.opensciencegrid.org + +export CC=$(which gcc) +export CXX=$(which g++) +export BUILD_SCRIPTS=/cvmfs/oasis.opensciencegrid.org/gluex/group/halld/Software/build_scripts +export PROJECT_ROOT=/workspace +export JANA_HOME=$PROJECT_ROOT/JANA2 +export JANA_PLUGIN_PATH=$PROJECT_ROOT/JANA2/plugins + +source $BUILD_SCRIPTS/gluex_env_boot_jlab.sh --bs $BUILD_SCRIPTS +gxenv $PROJECT_ROOT/JANA2/.github/jana_prereqs_version.xml + +echo "jana_home value: $JANA_HOME" + +cd $JANA_HOME +mkdir -p build +cd build + +echo "Building start" +cmake3 $JANA_HOME -DUSE_XERCES=1 -DCMAKE_CXX_STANDARD=17 +make install -j12 diff --git a/.github/jana_prereqs_version.xml b/.github/jana_prereqs_version.xml new file mode 100644 index 000000000..f40682d12 --- /dev/null +++ b/.github/jana_prereqs_version.xml @@ -0,0 +1,28 @@ + + + +Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/workflows/halld_recon.yml b/.github/workflows/halld_recon.yml new file mode 100644 index 000000000..4a6bae6f2 --- /dev/null +++ b/.github/workflows/halld_recon.yml @@ -0,0 +1,55 @@ +name: halld_recon + +on: + push: + branches: [master] + pull_request: + branches: [master] + + +jobs: + jana2_halld_recon: + name: halld_recon + runs-on: [self-hosted, macOS, ARM64] + + steps: + - uses: actions/checkout@v4 + with: + path: JANA2 + + - name: Make Scripts executable + run: | + chmod +x ./JANA2/.github/jana_build.sh + chmod +x ./JANA2/.github/halld_recon_build.sh + + - name: Build JANA2 on Alma9 + run: | + docker run --rm \ + --platform linux/amd64 \ + --privileged \ + --mount type=bind,source=${{ github.workspace }},target=/workspace \ + raiqarasool/gluex_build:cvmfs /bin/bash -c "source /workspace/JANA2/.github/jana_build.sh" + + - name: Git Clone Halld_recon + run: | + mkdir halld_recon + cd halld_recon + git clone --branch rasool_jana2 https://github.com/JeffersonLab/halld_recon.git . + + - name: Build Halld_recon on Alma9 + run: | + docker run --rm \ + --platform linux/amd64 \ + --privileged \ + --mount type=bind,source=${{ github.workspace }},target=/workspace \ + raiqarasool/gluex_build:cvmfs /bin/bash -c "source /workspace/JANA2/.github/halld_recon_build.sh" + + - name: Cleaning up created folders + if: always() + run: | + rm -rf JANA2 + rm -rf halld_recon + + + + diff --git a/containers/Docker/gluex.Dockerfile b/containers/Docker/gluex.Dockerfile new file mode 100644 index 000000000..10dd9d625 --- /dev/null +++ b/containers/Docker/gluex.Dockerfile @@ -0,0 +1,69 @@ +# +# Dockerfile - docker build script for a standard GlueX sim-recon +# container image based on alma linux 9. +# +# author: richard.t.jones at uconn.edu +# version: october 17 2023 +# +# usage: [as root] $ docker build Dockerfile . +# + +FROM almalinux:9 + + +# Add JLab CA certificate +ADD http://pki.jlab.org/JLabCA.crt /etc/pki/ca-trust/source/anchors/JLabCA.crt +# Update CA certificates +RUN chmod 644 /etc/pki/ca-trust/source/anchors/JLabCA.crt && update-ca-trust + + +# install the necessary yum repositories +RUN dnf -y update +RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +RUN grep 'enabled=1' /etc/yum.repos.d/epel.repo +RUN /usr/bin/crb enable +# RUN dnf -y install https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el9-release-latest.rpm +# RUN grep 'enabled=1' /etc/yum.repos.d/osg.repo + +# install a few utility rpms +RUN dnf -y install dnf dnf-plugins-core +RUN dnf -y install python-unversioned-command +RUN dnf -y install subversion cmake make imake python3-scons patch git +RUN dnf -y install libtool which bc nano nmap-ncat xterm emacs gdb wget +RUN dnf -y install gcc-c++ gcc-gfortran boost-devel gdb-gdbserver +RUN dnf -y install bind-utils blas blas-devel dump file tcsh expat-devel +RUN dnf -y install libXt-devel openmotif-devel libXpm-devel bzip2-devel +RUN dnf -y install perl-XML-Simple perl-XML-Writer perl-File-Slurp +RUN dnf -y install mesa-libGLU-devel gsl-devel python3-future python3-devel +RUN dnf -y install xrootd-client-libs xrootd-client libXi-devel neon +RUN dnf -y install mariadb mariadb-devel python3-mysqlclient python3-psycopg2 +RUN dnf -y install fmt-devel libtirpc-devel atlas rsync vim +RUN dnf -y install gfal2-all gfal2-devel gfal2-plugin-dcap gfal2-plugin-gridftp gfal2-plugin-srm +RUN dnf -y install hdf5 hdf5-devel pakchois perl-Test-Harness sqlite sqlite-devel +RUN dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel java-11-openjdk-devel +RUN dnf -y install java-17-openjdk-devel java-latest-openjdk-devel java-hdf5 java-runtime-decompiler +RUN dnf -y install lapack lapack-devel openmpi openmpi-devel xalan-j2 +RUN dnf -y install openssh-server postgresql-server-devel postgresql-upgrade-devel +RUN dnf -y install procps-ng strace ucx valgrind xerces-c xerces-c-devel xerces-c-doc +RUN dnf -y install qt5 qt5-qtx11extras qt5-devel openblas-devel libnsl2-devel + + +# install the osg worker node client packages +# RUN dnf -y install osg-ca-certs +# RUN dnf -y install osg-wn-client +RUN dnf -y install python3-h5py python3-scipy python3-tqdm + +# install some dcache client tools +RUN dnf -y install https://zeus.phys.uconn.edu/halld/gridwork/dcache-srmclient-3.0.11-1.noarch.rpm + +#Installing cvmfs +RUN dnf -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm \ + && dnf -y install cvmfs cvmfs-config-default \ + && echo "CVMFS_HTTP_PROXY=DIRECT" | tee -a /etc/cvmfs/default.local \ + && echo "CVMFS_REPOSITORIES=oasis.opensciencegrid.org,singularity.opensciencegrid.org" | tee -a /etc/cvmfs/default.local \ + && echo "CVMFS_CLIENT_PROFILE=single" | tee -a /etc/cvmfs/default.local \ + && dnf clean all + +# Fix for Silverblue's toolbox utility +RUN dnf -y install passwd sudo +RUN touch /.dockerenv \ No newline at end of file