Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add apptainer to GaudiExec #2321

Merged
merged 7 commits into from Apr 15, 2024
Merged

WIP: Add apptainer to GaudiExec #2321

merged 7 commits into from Apr 15, 2024

Conversation

mesmith75
Copy link
Contributor

Fixes #2320

@@ -564,7 +564,11 @@ def execCmd(self, cmd):
if cmd != 'make':
rc, stdout, stderr = _exec_cmd(cmd_file.name, self.directory)
else:
rc, stdout, stderr = _exec_cmd(cmd_file.name, self.directory)
if self.apptainerBuild or 'slc6' in self.platform:
cmd_to_run = 'apptainer exec --env "PATH=$PATH" --bind $PWD --bind /cvmfs:/cvmfs:ro /cvmfs/cernvm-prod.cern.ch/cvm4 ' + cmd_file.name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about the use if this image. There is no guarantee that /cvmfs/cernvm-prod.cern.ch is mounted at a given location. Is there not an official LHCb image for centos7?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is but I don't think it is on CVMFS. I guess we could add it to our won /cvmfs location if we really needed it.

@@ -195,7 +195,7 @@ class GaudiExec(IPrepareApp):
'nMakeCores': SimpleItem(defvalue=1,
doc='Number of cores to be provided via the "-j" option to the "make" command'\
'when building the ganga-input-sandbox'),

'apptainerBuild' : SimpleItem(defvaule=False, doc="Run the build command in apptainer"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name might come back and bite us. Setting this to True will get a very specific centos7 image which the name doesn't indicate. Maybe have a second option that includes the the name of the actual image.

@egede
Copy link
Member

egede commented Apr 12, 2024

There might be a way to satisfy both the issues raised here.

  • An option is introduced to give the location.
  • The default location is /cvmfs/cernvm-prod.cern.ch/cvm4 but other options could be gitlab-registry.cern.ch/lhcb-docker/os-base/centos7-devel:latest
  • The error message if things go wrong might be a bit more explaining of what can be changed.

@mesmith75
Copy link
Contributor Author

Yes, I think you are right

@heistera
Copy link

Perhaps, in case cvmfs ist not accessible, it is possible to download an image in a similar way like the following:

Apptainer("docker://gitlab-registry.cern.ch/lhcb-core/lbdocker/slc6-build:latest")

The same location has an image which looks like the source of the image used for cvmfs ...

@mesmith75
Copy link
Contributor Author

I'll merge this now and add on the prepareGaudiExec adjustment in a separate PR

@mesmith75 mesmith75 merged commit ebf1e98 into develop Apr 15, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with running slc6 based GaudiExec
3 participants