Skip to content

Commit

Permalink
Fix: exporting env variables to run singularity with -C option, resolves
Browse files Browse the repository at this point in the history
 #28.
  • Loading branch information
skchronicles committed Jan 29, 2024
1 parent a7a5ae3 commit d104540
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,12 @@ def runner(mode, outdir, alt_cache, logger, additional_bind_paths = None,
my_env = {}; my_env.update(os.environ)
cache = os.path.join(outdir, ".singularity")
my_env['SINGULARITY_CACHEDIR'] = cache
# Adding -C, --containall option
# for singularity/apptainer exections,
# here is a list of env variables:
# https://docs.sylabs.io/guides/3.7/user-guide/appendix.html
my_env['SINGULARITY_CONTAINALL'] = 'true'
my_env['APPTAINER_CONTAINALL'] = 'true'
if alt_cache:
# Override the pipeline's default
# cache location
Expand Down

0 comments on commit d104540

Please sign in to comment.