X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a9f1adf0a3e2df296ce0a8c0a1d735b7e5044baa..3a0aa1db801154916f50b1b299d5100945a3e1df:/sdk/cwl/arvados_cwl/arvcontainer.py diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 9bf93e7c56..73ba8d5208 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -3,7 +3,8 @@ import json import os from cwltool.errors import WorkflowException -from cwltool.process import get_feature, adjustFiles, UnsupportedRequirement, shortname +from cwltool.process import get_feature, UnsupportedRequirement, shortname +from cwltool.pathmapper import adjustFiles import arvados.collection @@ -41,14 +42,24 @@ class ArvadosContainer(object): } } + dirs = set() for f in self.pathmapper.files(): - _, p = self.pathmapper.mapper(f) - mounts[p] = { - "kind": "collection", - "portable_data_hash": p[6:] - } + _, p, tp = self.pathmapper.mapper(f) + if tp == "Directory" and '/' not in p[6:]: + mounts[p] = { + "kind": "collection", + "portable_data_hash": p[6:] + } + dirs.add(p[6:]) + for f in self.pathmapper.files(): + _, p, tp = self.pathmapper.mapper(f) + if p[6:].split("/")[0] not in dirs: + mounts[p] = { + "kind": "collection", + "portable_data_hash": p[6:] + } - if self.generatefiles: + if self.generatefiles["listing"]: raise UnsupportedRequirement("Generate files not supported") container_request["environment"] = {"TMPDIR": "/tmp"} @@ -58,6 +69,9 @@ class ArvadosContainer(object): if self.stdin: raise UnsupportedRequirement("Stdin redirection currently not suppported") + if self.stderr: + raise UnsupportedRequirement("Stderr redirection currently not suppported") + if self.stdout: mounts["stdout"] = {"kind": "file", "path": "%s/%s" % (self.outdir, self.stdout)}