From 47f161fd17095cb1c92c27b68376a3701c2a8942 Mon Sep 17 00:00:00 2001 From: Olga Botvinnik Date: Mon, 24 Jun 2019 17:30:39 -0700 Subject: [PATCH] Add docker.runOptions to avoid memory swap error --- .../{{cookiecutter.name_noslash}}/nextflow.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config index 6f0d53a0bb..f684adc20f 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config @@ -58,6 +58,11 @@ profiles { test { includeConfig 'conf/test.config' } } +// Avoid this error: +// WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. +// Thanks to: https://github.com/alesssia/YAMP/wiki/How-to-use-Docker +docker.runOptions = '-u $(id -u):$(id -g)' + // Load igenomes.config if required if(!params.igenomesIgnore){ includeConfig 'conf/igenomes.config'