When launching omicron jobs from a singularity container, the corresponding executable path will, in general, not exist in the environment in which the jobs get run. At a high level, it seems like this could be supported by:
- introducing a
--singularity-image (or similar) to the command line parser that defaults to os.getenv("SINGULARITY_CONTAINER"), which will be the full path to the running container's image if currently inside a container
- Add a similar argument to
OmicronProcessJob
- During
OmicronProcessJob.write_sub_file, check if self.singularity_image is not None, and if not add something like this to the sub file
f"""
+SingularityImage = "{self.singularity_image}"
Requirements = HasSingularity
"""
- Longer term, the functionality from the point could even be worth upstreaming into
glue.pipeline.CondorDAGJob.
If this is something the team thinks might be valuable, happy to take a stab at making a PR for this.
When launching omicron jobs from a singularity container, the corresponding executable path will, in general, not exist in the environment in which the jobs get run. At a high level, it seems like this could be supported by:
--singularity-image(or similar) to the command line parser that defaults toos.getenv("SINGULARITY_CONTAINER"), which will be the full path to the running container's image if currently inside a containerOmicronProcessJobOmicronProcessJob.write_sub_file, check ifself.singularity_image is not None, and if not add something like this to the sub fileglue.pipeline.CondorDAGJob.If this is something the team thinks might be valuable, happy to take a stab at making a PR for this.