|
17 | 17 | - |
|
18 | 18 | ```
|
19 | 19 |
|
20 |
| - Use a JSON object in a separate file to describe the input of a run: |
| 20 | + Use a YAML object in a separate file to describe the input of a run: |
21 | 21 |
|
22 | 22 | *echo-job.yml*
|
23 | 23 | ```
|
|
103 | 103 | Notice that "example_file", as a `File` type, must be provided as an
|
104 | 104 | object with the fields `class: File` and `path`.
|
105 | 105 |
|
106 |
| - Invoke `cwl-runner` with the tool wrapper and the input object on the |
| 106 | + Next, create a whale.txt and invoke `cwl-runner` with the tool wrapper and the input object on the |
107 | 107 | command line:
|
108 | 108 |
|
109 | 109 | ```
|
| 110 | + $ touch whale.txt |
110 | 111 | $ cwl-runner inp.cwl inp-job.yml
|
111 | 112 | [job 140020149614160] /home/example$ echo -f -i42 --example-string hello --file=/home/example/whale.txt
|
112 | 113 | -f -i42 --example-string hello --file=/home/example/whale.txt
|
|
215 | 216 | - |
|
216 | 217 | ```
|
217 | 218 |
|
218 |
| - Invoke `cwl-runner` with the tool wrapper and the input object on the |
| 219 | + Next, create a tar file for the example and invoke `cwl-runner` with the tool wrapper and the input object on the |
219 | 220 | command line:
|
220 | 221 | ```
|
| 222 | + $ touch hello.txt && tar -cvf hello.tar hello.txt |
221 | 223 | $ cwl-runner tar.cwl tar-job.yml
|
222 | 224 | [job 139868145165200] $ tar xf /home/example/hello.tar
|
223 | 225 | Final process status is success
|
|
305 | 307 | - |
|
306 | 308 | ```
|
307 | 309 |
|
308 |
| - Invoke `cwl-runner` with the tool wrapper and the input object on the |
| 310 | + Create your input files and invoke `cwl-runner` with the tool wrapper and the input object on the |
309 | 311 | command line:
|
310 | 312 | ```
|
| 313 | + $ rm hello.tar || true && touch goodbye.txt && tar -cvf hello.tar |
311 | 314 | $ cwl-runner example-tar-param.cwl example-tar-param-job.yml
|
312 | 315 | [job 139868145165200] $ tar xf /home/example/hello.tar goodbye.txt
|
313 | 316 | Final process status is success
|
|
371 | 374 | - |
|
372 | 375 | ```
|
373 | 376 |
|
374 |
| - Now invoke `cwl-runner` providing the tool wrapper and the input object |
| 377 | + Provide a hello.js and invoke `cwl-runner` providing the tool wrapper and the input object |
375 | 378 | on the command line:
|
376 | 379 |
|
377 | 380 | ```
|
378 |
| - $ cwl-runner example-docker.cwl example-docker-job.yml |
| 381 | + $ echo "console.log(\"Hello World\");" > hello.js |
| 382 | + $ cwl-runner docker.cwl docker-job.yml |
379 | 383 | [job 140259721854416] /home/example$ docker run -i --volume=/home/example/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpDLs5hm:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp node:slim node /var/lib/cwl/job369354770_examples/hello.js
|
380 | 384 | Hello world!
|
381 | 385 | Final process status is success
|
|
414 | 418 | - |
|
415 | 419 | ```
|
416 | 420 |
|
417 |
| - Now invoke `cwl-runner` providing the tool wrapper and the input object |
| 421 | + Now create a sample Java file and invoke `cwl-runner` providing the tool wrapper and the input object |
418 | 422 | on the command line:
|
419 | 423 |
|
420 | 424 | ```
|
421 |
| - $ cwl-runner example-arguments.cwl example-arguments-job.yml |
| 425 | + $ echo "public class Hello {}" > Hello.java |
| 426 | + $ cwl-runner arguments.cwl arguments-job.yml |
422 | 427 | [job 140051188854928] /home/example$ docker run -i --volume=/home/example/Hello.java:/var/lib/cwl/job710906416_example/Hello.java:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpdlQDWi:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp java:7 javac -d /var/spool/cwl /var/lib/cwl/job710906416_examples/Hello.java
|
423 | 428 | Final process status is success
|
424 | 429 | {
|
|
0 commit comments