You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 9, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/orchestration/nextflow/nextflow-overview.md
+119-1Lines changed: 119 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,11 +287,129 @@ process hello {
287
287
}
288
288
```
289
289
290
-
For each process in your workflow, Nextflow will create a corresponding Batch Job Definition, which it will re-use for subsequent workflow runs. You can customize these job definitions to incorporate additional environment variables or volumes/mount points as needed.
290
+
For each process in your workflow, Nextflow will create a corresponding Batch Job Definition, which it will re-use for subsequent workflow runs. The process defined above will create a Batch Job Definition called `nf-ubuntu-latest` that looks like:
You can customize these job definitions to incorporate additional environment variables or volumes/mount points as needed.
291
331
292
332
!!! important
293
333
In order to take advantage of automatically [expandable scratch space](/core-env/create-custom-compute-resources/) in the host instance, you will need to modify Nextflow created job definitions to map a container volume from `/scratch` on the host to `/tmp` in the container.
294
334
335
+
For example, a customized job definition for the process above that maps `/scratch` on the host to `/scratch` in the container and still work with Nextflow would be:
Nextflow will use the most recent revision of a Job Definition.
386
+
387
+
You can also predefine Job Definitions that leverage extra volume mappings and refer to them in the process definition. Assuming you had an existing Job Definition named `say-hello`, a process definition that utilized it would look like:
388
+
389
+
```groovy
390
+
texts = Channel.from("AWS", "Nextflow")
391
+
392
+
process hello {
393
+
// directives
394
+
// substitute the container image reference with a job-definition reference
395
+
container "job-definition://say-hello"
396
+
397
+
// compute resources for the Batch Job
398
+
cpus 1
399
+
memory '512 MB'
400
+
401
+
input:
402
+
val text from texts
403
+
404
+
output:
405
+
file 'hello.txt'
406
+
407
+
"""
408
+
echo "Hello $text" > hello.txt
409
+
"""
410
+
}
411
+
```
412
+
295
413
### Running the workflow
296
414
297
415
To run a workflow you submit a `nextflow` Batch job to the appropriate Batch Job Queue via:
0 commit comments