From f35d06eef0d6875aab1f6ba99616c1b6145875b4 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 4 Nov 2020 21:12:24 +0100 Subject: [PATCH] omit default bind type for singularity --- lib/galaxy/tool_util/deps/container_classes.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/deps/container_classes.py b/lib/galaxy/tool_util/deps/container_classes.py index bfda23afd79..e2da1e211eb 100644 --- a/lib/galaxy/tool_util/deps/container_classes.py +++ b/lib/galaxy/tool_util/deps/container_classes.py @@ -125,8 +125,10 @@ def preprocess_volumes(volumes_raw_str, container_type): ['/a/b:/a:ro', '/a/b/c:/a/b:rw'] >>> preprocess_volumes("/a/b:default_ro,/a/b/c:rw", DOCKER_CONTAINER_TYPE) ['/a/b:ro', '/a/b/c:rw'] + >>> preprocess_volumes("/a/b:default_ro,/a/b/c:ro", SINGULARITY_CONTAINER_TYPE) + ['/a/b:ro', '/a/b/c:ro'] >>> preprocess_volumes("/a/b:default_ro,/a/b/c:rw", SINGULARITY_CONTAINER_TYPE) - ['/a/b:rw', '/a/b/c:rw'] + ['/a/b', '/a/b/c'] """ volumes_raw_strs = [v.strip() for v in volumes_raw_str.split(",")] @@ -160,6 +162,12 @@ def preprocess_volumes(volumes_raw_str, container_type): volume[1] = how + # for a while singularity did not allow to specify the bind type rw + # (which is the default). so we omit this default + # see https://github.com/hpcng/singularity/pull/5487 + if container_type == SINGULARITY_CONTAINER_TYPE and volume[1] == 'rw': + del volume[1] + return [":".join(v) for v in volumes]