Merge branch '18682-use-keyrings-instead-of-key-ids'
[arvados.git] / doc / user / cwl / cwl-run-options.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "arvados-cwl-runner options"
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 # "*Command line options*":#options
13 # "*Specify workflow and output names*":#names
14 # "*Submit a workflow without waiting for the result*":#nowait
15 # "*Control a workflow locally*":#local
16 # "*Automatically delete intermediate outputs*":#delete
17 # "*Run workflow on a remote federated cluster*":#federation
18
19 h3(#options). Command line options
20
21 The following command line options are available for @arvados-cwl-runner@:
22
23 table(table table-bordered table-condensed).
24 |_. Option |_. Description |
25 |==--basedir== BASEDIR|     Base directory used to resolve relative references in the input, default to directory of input object file or current directory (if inputs piped/provided on command line).|
26 |==--eval-timeout EVAL_TIMEOUT==|Time to wait for a Javascript expression to evaluate before giving an error, default 20s.|
27 |==--print-dot==|           Print workflow visualization in graphviz format and exit|
28 |==--version==|             Print version and exit|
29 |==--validate==|            Validate CWL document only.|
30 |==--verbose==|             Default logging|
31 |==--quiet==|               Only print warnings and errors.|
32 |==--debug==|               Print even more logging|
33 |==--metrics==|             Print timing metrics|
34 |==--tool-help==|           Print command line help for tool|
35 |==--enable-reuse==|        Enable container reuse (default)|
36 |==--disable-reuse==|       Disable container reuse|
37 |==--project-uuid UUID==|   Project that will own the workflow containers, if not provided, will go to home project.|
38 |==--output-name OUTPUT_NAME==|Name to use for collection that stores the final output.|
39 |==--output-tags OUTPUT_TAGS==|Tags for the final output collection separated by commas, e.g., =='--output-tags tag0,tag1,tag2'==.|
40 |==--ignore-docker-for-reuse==|Ignore Docker image version when deciding whether to reuse past containers.|
41 |==--submit==|              Submit workflow runner to Arvados to manage the workflow (default).|
42 |==--local==|               Run workflow on local host (still submits containers to Arvados).|
43 |==--create-template==|     (Deprecated) synonym for --create-workflow.|
44 |==--create-workflow==|     Register an Arvados workflow that can be run from Workbench|
45 |==--update-workflow== UUID|Update an existing Arvados workflow or pipeline template with the given UUID.|
46 |==--wait==|                After submitting workflow runner, wait for completion.|
47 |==--no-wait==|             Submit workflow runner and exit.|
48 |==--log-timestamps==|      Prefix logging lines with timestamp|
49 |==--no-log-timestamps==|   No timestamp on logging lines|
50 |==--compute-checksum==|    Compute checksum of contents while collecting outputs|
51 |==--submit-runner-ram== SUBMIT_RUNNER_RAM|RAM (in MiB) required for the workflow runner (default 1024)|
52 |==--submit-runner-image== SUBMIT_RUNNER_IMAGE|Docker image for workflow runner|
53 |==--always-submit-runner==|When invoked with --submit --wait, always submit a runner to manage the workflow, even when only running a single CommandLineTool|
54 |==--match-submitter-images==|Where Arvados has more than one Docker image of the same name, use image from the Docker instance on the submitting node.|
55 |==--submit-request-uuid== UUID|Update and commit to supplied container request instead of creating a new one.|
56 |==--submit-runner-cluster== CLUSTER_ID|Submit workflow runner to a remote cluster|
57 |==--name NAME==|Name to use for workflow execution instance.|
58 |==--on-error== {stop,continue}|Desired workflow behavior when a step fails.  One of 'stop' (do not submit any more steps) or 'continue' (may submit other steps that are not downstream from the error). Default is 'continue'.|
59 |==--enable-dev==|Enable loading and running development versions of CWL spec.|
60 |==--storage-classes== STORAGE_CLASSES|Specify comma separated list of storage classes to be used when saving the final workflow output to Keep.|
61 |==--intermediate-storage-classes== STORAGE_CLASSES|Specify comma separated list of storage classes to be used when intermediate workflow output to Keep.|
62 |==--intermediate-output-ttl== N|If N > 0, intermediate output collections will be trashed N seconds after creation. Default is 0 (don't trash).|
63 |==--priority== PRIORITY|Workflow priority (range 1..1000, higher has precedence over lower)|
64 |==--thread-count== THREAD_COUNT|Number of threads to use for container submit and output collection.|
65 |==--http-timeout== HTTP_TIMEOUT|API request timeout in seconds. Default is 300 seconds (5 minutes).|
66 |==--trash-intermediate==|Immediately trash intermediate outputs on workflow success.|
67 |==--no-trash-intermediate==|Do not trash intermediate outputs (default).|
68
69
70 h3(#names). Specify workflow and output names
71
72 Use the @--name@ and @--output-name@ options to specify the name of the workflow and name of the output collection.
73
74 <notextile>
75 <pre><code>~/arvados/doc/user/cwl/bwa-mem$ <span class="userinput">arvados-cwl-runner --name "Example bwa run" --output-name "Example bwa output" bwa-mem.cwl bwa-mem-input.yml</span>
76 arvados-cwl-runner 1.0.20160628195002, arvados-python-client 0.1.20160616015107, cwltool 1.0.20160629140624
77 2016-06-30 14:56:36 arvados.arv-run[27002] INFO: Upload local files: "bwa-mem.cwl"
78 2016-06-30 14:56:36 arvados.arv-run[27002] INFO: Uploaded to zzzzz-4zz18-h7ljh5u76760ww2
79 2016-06-30 14:56:40 arvados.cwl-runner[27002] INFO: Submitted job zzzzz-8i9sb-fm2n3b1w0l6bskg
80 2016-06-30 14:56:41 arvados.cwl-runner[27002] INFO: Job bwa-mem.cwl (zzzzz-8i9sb-fm2n3b1w0l6bskg) is Running
81 2016-06-30 14:57:12 arvados.cwl-runner[27002] INFO: Job bwa-mem.cwl (zzzzz-8i9sb-fm2n3b1w0l6bskg) is Complete
82 2016-06-30 14:57:12 arvados.cwl-runner[27002] INFO: Overall process status is success
83 {
84     "aligned_sam": {
85         "path": "keep:54325254b226664960de07b3b9482349+154/HWI-ST1027_129_D0THKACXX.1_1.sam",
86         "checksum": "sha1$0dc46a3126d0b5d4ce213b5f0e86e2d05a54755a",
87         "class": "File",
88         "size": 30738986
89     }
90 }
91 </code></pre>
92 </notextile>
93
94 h3(#nowait). Submit a workflow without waiting for the result
95
96 To submit a workflow and exit immediately, use the @--no-wait@ option.  This will submit the workflow to Arvados, print out the UUID of the job that was submitted to standard output, and exit.
97
98 <notextile>
99 <pre><code>~/arvados/doc/user/cwl/bwa-mem$ <span class="userinput">arvados-cwl-runner --no-wait bwa-mem.cwl bwa-mem-input.yml</span>
100 arvados-cwl-runner 1.0.20160628195002, arvados-python-client 0.1.20160616015107, cwltool 1.0.20160629140624
101 2016-06-30 15:07:52 arvados.arv-run[12480] INFO: Upload local files: "bwa-mem.cwl"
102 2016-06-30 15:07:52 arvados.arv-run[12480] INFO: Uploaded to zzzzz-4zz18-eqnfwrow8aysa9q
103 2016-06-30 15:07:52 arvados.cwl-runner[12480] INFO: Submitted job zzzzz-8i9sb-fm2n3b1w0l6bskg
104 zzzzz-8i9sb-fm2n3b1w0l6bskg
105 </code></pre>
106 </notextile>
107
108 h3(#local). Control a workflow locally
109
110 To run a workflow with local control, use @--local@.  This means that the host where you run @arvados-cwl-runner@ will be responsible for submitting containers, however, the containers themselves will still run on the Arvados cluster.  With @--local@, if you interrupt @arvados-cwl-runner@ or log out, the workflow will be terminated.
111
112 <notextile>
113 <pre><code>~/arvados/doc/user/cwl/bwa-mem$ <span class="userinput">arvados-cwl-runner --local bwa-mem.cwl bwa-mem-input.yml</span>
114 arvados-cwl-runner 1.0.20160628195002, arvados-python-client 0.1.20160616015107, cwltool 1.0.20160629140624
115 2016-07-01 10:05:19 arvados.cwl-runner[16290] INFO: Pipeline instance zzzzz-d1hrv-92wcu6ldtio74r4
116 2016-07-01 10:05:28 arvados.cwl-runner[16290] INFO: Job bwa-mem.cwl (zzzzz-8i9sb-2nzzfbuf9zjrj4g) is Queued
117 2016-07-01 10:05:29 arvados.cwl-runner[16290] INFO: Job bwa-mem.cwl (zzzzz-8i9sb-2nzzfbuf9zjrj4g) is Running
118 2016-07-01 10:05:45 arvados.cwl-runner[16290] INFO: Job bwa-mem.cwl (zzzzz-8i9sb-2nzzfbuf9zjrj4g) is Complete
119 2016-07-01 10:05:46 arvados.cwl-runner[16290] INFO: Overall process status is success
120 {
121     "aligned_sam": {
122         "size": 30738986,
123         "path": "keep:15f56bad0aaa7364819bf14ca2a27c63+88/HWI-ST1027_129_D0THKACXX.1_1.sam",
124         "checksum": "sha1$0dc46a3126d0b5d4ce213b5f0e86e2d05a54755a",
125         "class": "File"
126     }
127 }
128 </code></pre>
129 </notextile>
130
131 h3(#delete). Automatically delete intermediate outputs
132
133 Use the @--intermediate-output-ttl@ and @--trash-intermediate@ options to specify how long intermediate outputs should be kept (in seconds) and whether to trash them immediately upon successful workflow completion.
134
135 Temporary collections will be trashed @intermediate-output-ttl@ seconds after creation.  A value of zero (default) means intermediate output should be retained indefinitely.
136
137 Note: arvados-cwl-runner currently does not take workflow dependencies into account when setting the TTL on an intermediate output collection. If the TTL is too short, it is possible for a collection to be trashed before downstream steps that consume it are started.  The recommended minimum value for TTL is the expected duration for the entire the workflow.
138
139 Using @--trash-intermediate@ without @--intermediate-output-ttl@ means that intermediate files will be trashed on successful completion, but will remain on workflow failure.
140
141 Using @--intermediate-output-ttl@ without @--trash-intermediate@ means that intermediate files will be trashed only after the TTL expires (regardless of workflow success or failure).
142
143 h3(#federation). Run workflow on a remote federated cluster
144
145 By default, the workflow runner will run on the local (home) cluster.  Using @--submit-runner-cluster@ you can specify that the runner should be submitted to a remote federated cluster.  When doing this, @--project-uuid@ should specify a project on that cluster.  Steps making up the workflow will be submitted to the remote federated cluster by default, but the behavior of @arv:ClusterTarget@ is unchanged.  Note: when using this option, any resources that need to be uploaded in order to run the workflow (such as files or Docker images) will be uploaded to the local (home) cluster, and streamed to the federated cluster on demand.