[ARVADOS] created: aeaef97c33e37f73dd133dcc098ca6f42a9adde1
Git user
git at public.curoverse.com
Thu Aug 11 16:55:15 EDT 2016
at aeaef97c33e37f73dd133dcc098ca6f42a9adde1 (commit)
commit aeaef97c33e37f73dd133dcc098ca6f42a9adde1
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Aug 11 16:55:10 2016 -0400
9776: Ensure that $HOME and $TMPDIR are set correctly.
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index 780ab89..413435d 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -62,7 +62,7 @@ class ArvadosContainer(object):
if self.generatefiles["listing"]:
raise UnsupportedRequirement("Generate files not supported")
- container_request["environment"] = {"TMPDIR": "/tmp"}
+ container_request["environment"] = {"TMPDIR": self.tmpdir, "HOME": self.outdir}
if self.environment:
container_request["environment"].update(self.environment)
diff --git a/sdk/cwl/arvados_cwl/arvjob.py b/sdk/cwl/arvados_cwl/arvjob.py
index 9f11058..a688469 100644
--- a/sdk/cwl/arvados_cwl/arvjob.py
+++ b/sdk/cwl/arvados_cwl/arvjob.py
@@ -51,7 +51,7 @@ class ArvadosJob(object):
if p.type == "CreateFile":
script_parameters["task.vwd"][p.target] = "$(task.keep)/%s/%s" % (vwd.portable_data_hash(), p.target)
- script_parameters["task.env"] = {"TMPDIR": "$(task.tmpdir)"}
+ script_parameters["task.env"] = {"TMPDIR": self.tmpdir, "HOME": self.outdir}
if self.environment:
script_parameters["task.env"].update(self.environment)
diff --git a/sdk/cwl/arvados_cwl/arvtool.py b/sdk/cwl/arvados_cwl/arvtool.py
index 7107ba0..987ce89 100644
--- a/sdk/cwl/arvados_cwl/arvtool.py
+++ b/sdk/cwl/arvados_cwl/arvtool.py
@@ -37,4 +37,6 @@ class ArvadosCommandTool(CommandLineTool):
elif self.work_api == "jobs":
kwargs["outdir"] = "$(task.outdir)"
kwargs["docker_outdir"] = "$(task.outdir)"
+ kwargs["tmpdir"] = "$(task.tmpdir)"
+ kwargs["docker_tmpdir"] = "$(task.tmpdir)"
return super(ArvadosCommandTool, self).job(joborder, output_callback, **kwargs)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list