From 778bcb875726ad9d8eee20c229ebcf5636d3caef Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Fri, 26 Apr 2024 10:12:27 +0200 Subject: [PATCH] use LHCb apptainer --- ganga/GangaLHCb/Lib/Applications/GaudiExec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ganga/GangaLHCb/Lib/Applications/GaudiExec.py b/ganga/GangaLHCb/Lib/Applications/GaudiExec.py index 035bedd202..02be281528 100755 --- a/ganga/GangaLHCb/Lib/Applications/GaudiExec.py +++ b/ganga/GangaLHCb/Lib/Applications/GaudiExec.py @@ -561,7 +561,7 @@ def execCmd(self, cmd): if self.useApptainer or 'slc6' in self.platform: try: logger.info('Building inside apptainer: %s' % self.containerLocation) - cmd_to_run = 'apptainer exec --bind $PWD --bind %s --bind /cvmfs:/cvmfs:ro ' % os.path.dirname(cmd_file.name)\ + cmd_to_run = 'source /cvmfs/lhcb.cern.ch/lib/LbEnv && apptainer exec --bind $PWD --bind %s --bind /cvmfs:/cvmfs:ro ' % os.path.dirname(cmd_file.name)\ + self.containerLocation + ' bash -c "%s"' % initialCommand rc, stdout, stderr = _exec_cmd(cmd_to_run, self.directory) except BaseException: @@ -581,7 +581,7 @@ def execCmd(self, cmd): if self.useApptainer or 'slc6' in self.platform: try: logger.info('Building inside apptainer: %s' % self.containerLocation) - cmd_to_run = 'apptainer exec --bind $PWD --bind %s --bind /cvmfs:/cvmfs:ro ' % os.path.dirname(cmd_file.name)\ + cmd_to_run = 'source /cvmfs/lhcb.cern.ch/lib/LbEnv && apptainer exec --bind $PWD --bind %s --bind /cvmfs:/cvmfs:ro ' % os.path.dirname(cmd_file.name)\ + self.containerLocation + ' bash -c "source ' + cmd_file.name + '"' rc, stdout, stderr = _exec_cmd(cmd_to_run, self.directory) except BaseException: