Skip to content

Commit

Permalink
use slc6 image
Browse files Browse the repository at this point in the history
  • Loading branch information
mesmith75 committed Apr 23, 2024
1 parent 0b39f9c commit 5f072ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions ganga/GangaLHCb/Lib/Applications/GaudiExec.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class GaudiExec(IPrepareApp):
doc='Number of cores to be provided via the "-j" option to the "make" command'\
'when building the ganga-input-sandbox'),
'useApptainer' : SimpleItem(defvalue=False, doc="Run the commands in apptainer"),
'containerLocation' : SimpleItem(defvalue='/cvmfs/cernvm-prod.cern.ch/cvm4',
'containerLocation' : SimpleItem(defvalue='/cvmfs/lhcb.cern.ch/containers/os-base/slc6-devel/prod/amd64',
doc='Where is the container to use for the build located'),
# Prepared job object
'is_prepared': SimpleItem(defvalue=None, strict_sequence=0, visitable=1, copyable=1, hidden=0,
Expand Down Expand Up @@ -552,8 +552,8 @@ def execCmd(self, cmd):
# command reliably... so we're just going to be explicit

if not path.isfile(path.join(self.directory, 'build.%s' % self.platform, 'run')):
initialCommand = 'export CMTCONFIG=%s && source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh --cmtconfig=%s && make -j%s' % (
self.platform, self.platform, self.nMakeCores)
initialCommand = 'export CMTCONFIG=%s && export BINARY_TAG=%s && source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh --cmtconfig=%s && make -j%s' % (
self.platform, self.platform, self.platform, self.nMakeCores)
if isLbEnv:
initialCommand = 'source /cvmfs/lhcb.cern.ch/lib/LbEnv && source LbLogin.sh -c %s && make -j%s' % (
self.platform, self.nMakeCores)
Expand All @@ -569,8 +569,9 @@ 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 --env "PATH=$PATH" --bind $PWD --bind /cvmfs:/cvmfs:ro '\
+ self.containerLocation + ' ' + cmd_file.name
cmd_to_run = 'apptainer exec --bind $PWD --bind /tmp --bind /cvmfs:/cvmfs:ro '\
+ self.containerLocation + ' bash -c "source ' + cmd_file.name + '"'
print('command to run: ', cmd_to_run)
rc, stdout, stderr = _exec_cmd(cmd_to_run, self.directory)
except:
logger.error('Failed to build the application inside a container. '
Expand Down
2 changes: 1 addition & 1 deletion ganga/GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def prepareCommand(app):
if app.extraArgs:
full_cmd += " " + " ".join(app.extraArgs)
if app.useApptainer or 'slc6' in app.platform:
full_cmd = 'apptainer exec --env "PATH=$PATH" --bind $PWD --bind /cvmfs:/cvmfs:ro /cvmfs/cernvm-prod.cern.ch/cvm4 bash -c "%s"' % full_cmd
full_cmd = 'apptainer exec --env "PATH=$PATH" --bind $PWD --bind /cvmfs:/cvmfs:ro /cvmfs/lhcb.cern.ch/containers/os-base/slc6-devel/prod/amd64 bash -c "%s"' % full_cmd

return full_cmd

Expand Down

0 comments on commit 5f072ea

Please sign in to comment.