X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/682dd5b6cc23a455766a7651e3e841257660b31c..932e3d6e9a899cc662ea3934b79057d39cd88fed:/doc/user/topics/run-command.html.textile.liquid diff --git a/doc/user/topics/run-command.html.textile.liquid b/doc/user/topics/run-command.html.textile.liquid index 5ffeb18367..6996475c3d 100644 --- a/doc/user/topics/run-command.html.textile.liquid +++ b/doc/user/topics/run-command.html.textile.liquid @@ -3,9 +3,18 @@ layout: default navsection: userguide title: "run-command reference" ... +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} + +{% include 'pipeline_deprecation_notice' %} The @run-command@ crunch script enables you run command line programs. +{% include 'tutorial_expectations_workstation' %} + h1. Using run-command The basic @run-command@ process evaluates its inputs and builds a command line, executes the command, and saves the contents of the output directory back to Keep. For large datasets, @run-command@ can schedule concurrent tasks to execute the wrapped program over a range of inputs (see @task.foreach@ below.) @@ -237,6 +246,19 @@ Provide standard input and standard output redirection. @task.stdout@ specifies the desired file name in the output directory to save the content of standard output. When command describes a Unix pipeline, this captures the output of the last command. +h3. task.env + +Set environment variables for the command. Accepts an object mapping environment variables to the desired values. Parameter substitution is performed on values, but not on the environment variable names themselves. Example usage: + +
+{
+  "command": ["/bin/sh", "-c", "echo $MY_ENV_VAR"],
+  "task.env": {
+    "MY_ENV_VAR": "Hello world!"
+  }
+}
+
+ h3. task.vwd Background: because Keep collections are read-only, this does not play well with certain tools that expect to be able to write their outputs alongside their inputs (such as tools that generate indexes that are closely associated with the original file.) The run-command's solution to this is the "virtual working directory".