From bd1378553152e98ffd0e9ecf68dc0f92ea3ff186 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 10 Jan 2018 15:44:50 -0500 Subject: [PATCH] 12764: arvados-cwl-runner support Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/cwl/arvados_cwl/__init__.py | 4 ++-- sdk/cwl/arvados_cwl/arvcontainer.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index e82fd9feef..892cb0a630 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -224,8 +224,8 @@ class ArvCwlRunner(object): def check_features(self, obj): if isinstance(obj, dict): - if obj.get("writable"): - raise SourceLine(obj, "writable", UnsupportedRequirement).makeError("InitialWorkDir feature 'writable: true' not supported") + #if obj.get("writable"): + # raise SourceLine(obj, "writable", UnsupportedRequirement).makeError("InitialWorkDir feature 'writable: true' not supported") if obj.get("class") == "DockerRequirement": if obj.get("dockerOutputDirectory"): # TODO: can be supported by containers API, but not jobs API. diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 014e1b94aa..deccc69753 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -109,7 +109,7 @@ class ArvadosContainer(object): for f, p in generatemapper.items(): if not p.target: pass - elif p.type in ("File", "Directory"): + elif p.type in ("File", "Directory", "WritableFile", "WritableDirectory"): source, path = self.arvrunner.fs_access.get_collection(p.resolved) vwd.copy(path, p.target, source_collection=source) elif p.type == "CreateFile": @@ -126,6 +126,8 @@ class ArvadosContainer(object): mounts[mountpoint] = {"kind": "collection", "portable_data_hash": vwd.portable_data_hash(), "path": p.target} + if t.type.startswith("Writable"): + mounts[mountpoint]["writable"] = True container_request["environment"] = {"TMPDIR": self.tmpdir, "HOME": self.outdir} if self.environment: -- 2.30.2