From 7f3627fbd98e0007c9bda6d15c9c715d1e241861 Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Mon, 22 Jul 2024 12:00:36 -0400 Subject: [PATCH 1/5] Add gluex alma 9 environment for CI usage --- containers/Docker/gluex.Dockerfile | 102 +++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 containers/Docker/gluex.Dockerfile diff --git a/containers/Docker/gluex.Dockerfile b/containers/Docker/gluex.Dockerfile new file mode 100644 index 000000000..b732655d7 --- /dev/null +++ b/containers/Docker/gluex.Dockerfile @@ -0,0 +1,102 @@ +# +# 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 docker.io/almalinux:9 + +# 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 +RUN dnf -y install libcurl-devel uClibc-devel libuuid-devel + +# install the cern root suite +RUN dnf -y install root root-cling root-fftw root-foam root-fonts root-fumili \ + root-gdml root-genetic root-genvector root-geom root-geom-builder \ + root-geom-painter root-geom-webviewer root-graf root-graf-asimage \ + root-graf-fitsio root-graf-gpad root-graf-gpadv7 root-graf-gviz \ + root-graf-postscript root-graf-primitives root-graf-x11 root-graf3d \ + root-graf3d-csg root-graf3d-eve root-graf3d-eve7 root-graf3d-gl \ + root-graf3d-gviz3d root-graf3d-x3d \ + root-hbook root-hist root-hist-draw root-hist-factory root-hist-painter \ + root-histv7 root-html root-icons root-io root-io-dcache \ + root-io-sql root-io-xml root-io-xmlparser root-mathcore root-mathmore \ + root-matrix root-minuit root-minuit2 root-mlp root-montecarlo-eg \ + root-montecarlo-pythia8 root-multiproc root-net root-net-auth \ + root-net-davix root-net-http root-net-httpsniff root-net-rpdutils \ + root-netx root-notebook root-physics root-proof root-proof-bench \ + root-proof-player root-proof-sessionviewer root-quadp root-r root-r-tools \ + root-roofit root-roofit-batchcompute root-roofit-core \ + root-roofit-dataframe-helpers root-roofit-hs3 root-roofit-jsoninterface \ + root-roofit-more root-roostats root-smatrix \ + root-spectrum root-spectrum-painter root-splot root-sql-mysql \ + root-sql-odbc root-sql-pgsql root-sql-sqlite root-testsupport \ + root-tmva root-tmva-gui root-tmva-python root-tmva-r root-tmva-sofie \ + root-tmva-sofie-parser root-tmva-utils root-tpython root-tree \ + root-tree-dataframe root-tree-ntuple root-tree-ntuple-utils \ + root-tree-player root-tree-viewer root-tree-webviewer root-unfold \ + root-unuran root-vecops root-xroofit +# root packages removed from the list for unsatisfied dependencies +# root-gui-qt5webdisplay root-gui-qt6webdisplay +# root-gui-browserv7 root-gui-builder root-gui-canvaspainter root-gui-fitpanel +# root-gui-fitpanelv7 root-gui-ged root-gui-html root-gui-webdisplay +# root-gui-recorder root-gui-webgui6 root-gui root-gui-browsable +# root-roofit-common root-io-gfal +RUN dnf -y install HepMC3-rootIO python3-HepMC3-rootIO python3-jupyroot python3-root + +# 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 + +# install some python modules +RUN pip3 install pandas +RUN pip3 install h5hep +RUN pip3 install keras +RUN pip3 install tensorflow tensorflow-decision-forests +RUN pip3 install uproot awkward +RUN pip3 install jupyterhub +RUN pip3 install jupyterlab notebook + + +# Fix for Silverblue's toolbox utility +RUN dnf -y install passwd sudo +RUN ln -s /run/host/opt/cvmfs /cvmfs +RUN ln -s /cvmfs/oasis.opensciencegrid.org/gluex/group /group +RUN touch /.dockerenv + + From 6a6bd5daaa08307e4a6e21b1be9508067d2cb6b2 Mon Sep 17 00:00:00 2001 From: Raiqa Rasool <86972954+RaiqaRasool@users.noreply.github.com> Date: Wed, 7 Aug 2024 10:58:37 -0400 Subject: [PATCH 2/5] Modified gluex.Dockerfile to add cvmfs installation and remove extra packages installation --- containers/Docker/gluex.Dockerfile | 73 ++++++++---------------------- 1 file changed, 20 insertions(+), 53 deletions(-) diff --git a/containers/Docker/gluex.Dockerfile b/containers/Docker/gluex.Dockerfile index b732655d7..10dd9d625 100644 --- a/containers/Docker/gluex.Dockerfile +++ b/containers/Docker/gluex.Dockerfile @@ -8,15 +8,22 @@ # usage: [as root] $ docker build Dockerfile . # -FROM docker.io/almalinux:9 +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 +# 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 @@ -39,64 +46,24 @@ 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 -RUN dnf -y install libcurl-devel uClibc-devel libuuid-devel -# install the cern root suite -RUN dnf -y install root root-cling root-fftw root-foam root-fonts root-fumili \ - root-gdml root-genetic root-genvector root-geom root-geom-builder \ - root-geom-painter root-geom-webviewer root-graf root-graf-asimage \ - root-graf-fitsio root-graf-gpad root-graf-gpadv7 root-graf-gviz \ - root-graf-postscript root-graf-primitives root-graf-x11 root-graf3d \ - root-graf3d-csg root-graf3d-eve root-graf3d-eve7 root-graf3d-gl \ - root-graf3d-gviz3d root-graf3d-x3d \ - root-hbook root-hist root-hist-draw root-hist-factory root-hist-painter \ - root-histv7 root-html root-icons root-io root-io-dcache \ - root-io-sql root-io-xml root-io-xmlparser root-mathcore root-mathmore \ - root-matrix root-minuit root-minuit2 root-mlp root-montecarlo-eg \ - root-montecarlo-pythia8 root-multiproc root-net root-net-auth \ - root-net-davix root-net-http root-net-httpsniff root-net-rpdutils \ - root-netx root-notebook root-physics root-proof root-proof-bench \ - root-proof-player root-proof-sessionviewer root-quadp root-r root-r-tools \ - root-roofit root-roofit-batchcompute root-roofit-core \ - root-roofit-dataframe-helpers root-roofit-hs3 root-roofit-jsoninterface \ - root-roofit-more root-roostats root-smatrix \ - root-spectrum root-spectrum-painter root-splot root-sql-mysql \ - root-sql-odbc root-sql-pgsql root-sql-sqlite root-testsupport \ - root-tmva root-tmva-gui root-tmva-python root-tmva-r root-tmva-sofie \ - root-tmva-sofie-parser root-tmva-utils root-tpython root-tree \ - root-tree-dataframe root-tree-ntuple root-tree-ntuple-utils \ - root-tree-player root-tree-viewer root-tree-webviewer root-unfold \ - root-unuran root-vecops root-xroofit -# root packages removed from the list for unsatisfied dependencies -# root-gui-qt5webdisplay root-gui-qt6webdisplay -# root-gui-browserv7 root-gui-builder root-gui-canvaspainter root-gui-fitpanel -# root-gui-fitpanelv7 root-gui-ged root-gui-html root-gui-webdisplay -# root-gui-recorder root-gui-webgui6 root-gui root-gui-browsable -# root-roofit-common root-io-gfal -RUN dnf -y install HepMC3-rootIO python3-HepMC3-rootIO python3-jupyroot python3-root # 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 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 -# install some python modules -RUN pip3 install pandas -RUN pip3 install h5hep -RUN pip3 install keras -RUN pip3 install tensorflow tensorflow-decision-forests -RUN pip3 install uproot awkward -RUN pip3 install jupyterhub -RUN pip3 install jupyterlab notebook - +#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 ln -s /run/host/opt/cvmfs /cvmfs -RUN ln -s /cvmfs/oasis.opensciencegrid.org/gluex/group /group -RUN touch /.dockerenv - - +RUN touch /.dockerenv \ No newline at end of file From e13c9ccc1170af29c56ef2cdbee34621e4e00250 Mon Sep 17 00:00:00 2001 From: Raiqa Rasool <86972954+RaiqaRasool@users.noreply.github.com> Date: Wed, 7 Aug 2024 10:59:34 -0400 Subject: [PATCH 3/5] Added scripts and version files required for halld_recon.yml --- .github/halld_recon_build.sh | 19 +++++++++++++ .github/halld_recon_build_prereqs_version.xml | 16 +++++++++++ .github/jana_build.sh | 26 +++++++++++++++++ .github/jana_prereqs_version.xml | 28 +++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 .github/halld_recon_build.sh create mode 100644 .github/halld_recon_build_prereqs_version.xml create mode 100644 .github/jana_build.sh create mode 100644 .github/jana_prereqs_version.xml 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 + + + + + + + + + + + + + + + + + + + + + + + + From 682e84dd694648152c02afb9133f10bd2cba8cc1 Mon Sep 17 00:00:00 2001 From: Raiqa Rasool <86972954+RaiqaRasool@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:01:00 -0400 Subject: [PATCH 4/5] Added halld_recon.yml --- .github/workflows/halld_recon.yml | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/halld_recon.yml diff --git a/.github/workflows/halld_recon.yml b/.github/workflows/halld_recon.yml new file mode 100644 index 000000000..8d7cf90db --- /dev/null +++ b/.github/workflows/halld_recon.yml @@ -0,0 +1,55 @@ +name: halld_recon + +on: + push: + branches: [rasool_gluex_ci] + pull_request: + branches: [rasool_gluex_ci] + + +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 + + + + From 889facb608232052496ce6fd438945b835d16e47 Mon Sep 17 00:00:00 2001 From: Raiqa Rasool <86972954+RaiqaRasool@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:44:15 -0400 Subject: [PATCH 5/5] halld_recon workflow trigger branch changed to master --- .github/workflows/halld_recon.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/halld_recon.yml b/.github/workflows/halld_recon.yml index 8d7cf90db..4a6bae6f2 100644 --- a/.github/workflows/halld_recon.yml +++ b/.github/workflows/halld_recon.yml @@ -2,9 +2,9 @@ name: halld_recon on: push: - branches: [rasool_gluex_ci] + branches: [master] pull_request: - branches: [rasool_gluex_ci] + branches: [master] jobs: