Skip to content

Commit

Permalink
fix: allow apptainer as a successor to singularity. (#1706)
Browse files Browse the repository at this point in the history
Closes #1570.
  • Loading branch information
bilke committed Jun 15, 2022
1 parent 1d4909e commit bcbdb0b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions snakemake/deployment/singularity.py
Expand Up @@ -173,9 +173,14 @@ def check(self):
raise WorkflowError(
"Failed to get singularity version:\n{}".format(e.stderr.decode())
)
v = v.rsplit(" ", 1)[-1]
if v.startswith("v"):
v = v[1:]
if not LooseVersion(v) >= LooseVersion("2.4.1"):
raise WorkflowError("Minimum singularity version is 2.4.1.")
if v.startswith("apptainer"):
v = v.rsplit(" ", 1)[-1]
if not LooseVersion(v) >= LooseVersion("1.0.0"):
raise WorkflowError("Minimum apptainer version is 1.0.0.")
else:
v = v.rsplit(" ", 1)[-1]
if v.startswith("v"):
v = v[1:]
if not LooseVersion(v) >= LooseVersion("2.4.1"):
raise WorkflowError("Minimum singularity version is 2.4.1.")
self._version = v

0 comments on commit bcbdb0b

Please sign in to comment.