Skip to content

Commit

Permalink
Merge pull request #2359 from ganga-devs/apptainer_fix
Browse files Browse the repository at this point in the history
add another apptainer wrap
  • Loading branch information
mesmith75 authored Jun 18, 2024
2 parents 6752589 + 07e28ac commit 9df4223
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ganga/GangaLHCb/Lib/Applications/GaudiExec.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,12 @@ def execCmd(self, cmd):
logger.error("StdErr: %s" % str(stderr))
raise GangaException("Failed to execute command")
if cmd != 'make':
rc, stdout, stderr = _exec_cmd(cmd_file.name, self.directory)
if self.useApptainer or 'slc6' in self.platform:
cmd_to_run = 'source /cvmfs/lhcb.cern.ch/lib/LbEnv && apptainer exec --bind $PWD --bind %s --bind /cvmfs:/cvmfs:ro ' % path.dirname(cmd_file.name)\
+ self.containerLocation + ' %s' % cmd_file.name
rc, stdout, stderr = _exec_cmd(cmd_to_run, self.directory)
else:
rc, stdout, stderr = _exec_cmd(cmd_file.name, self.directory)
else:
if self.useApptainer or 'slc6' in self.platform:
try:
Expand Down

0 comments on commit 9df4223

Please sign in to comment.