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

fix: allow apptainer as a successor to singularity. #1706

Merged
merged 1 commit into from Jun 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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