Skip to content

Commit ffe680d

Browse files
committed
Organizing resource tags and values for compression appropriately
1 parent 6068827 commit ffe680d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

nextflow/configs/profiles/sumner2.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,15 @@ process {
540540
errorStrategy = { task.attempt <= 3 ? 'retry' : 'ignore' }
541541
maxRetries = 3
542542
}
543+
withLabel: "r_compression" {
544+
// Note: These resources are enough for 1-hour 800x800 videos.
545+
// TODO: These values should scale to duration and size of video.
546+
cpus = 2
547+
memory = 2.GB
548+
time = 2.hours
549+
array = 200
550+
errorStrategy = 'ignore'
551+
}
543552
}
544553

545554
executor {

nextflow/modules/compression.nf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
* @return file Path to compressed video
1010
*/
1111
process COMPRESS_VIDEO_CRF {
12-
label "compression"
12+
label "cpu"
13+
// Any environment with ffmpeg installed should work here.
14+
label "tracking"
15+
label "r_compression"
1316

1417
input:
1518
tuple path(video_file), val(crf), val(keyframe_interval)
@@ -38,7 +41,10 @@ process COMPRESS_VIDEO_CRF {
3841
* @note COMPRESS_VIDEO_CRF will typically produce better videos with a low signal-to-noise ratio.
3942
*/
4043
process COMPRESS_VIDEO_BR {
41-
label "compression"
44+
label "cpu"
45+
// Any environment with ffmpeg installed should work here.
46+
label "tracking"
47+
label "r_compression"
4248

4349
input:
4450
tuple path(video_file), val(bitrate), val(keyframe_interval)
@@ -66,6 +72,8 @@ process COMPRESS_VIDEO_BR {
6672
* @note Difference videos are useful in comparing changes due to compression.
6773
*/
6874
process COMPUTE_VIDEO_DIFFERENCE {
75+
label "cpu"
76+
// Any environment with ffmpeg installed should work here.
6977
label "tracking"
7078

7179
input:

0 commit comments

Comments
 (0)