From a549939200cffe51850713acabe8bb20e75d21e3 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Thu, 4 Mar 2021 21:18:55 +0000 Subject: [PATCH 1/2] Added user/group permissions options in accordance with template-nf --- pipeline/config/methods.config | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pipeline/config/methods.config b/pipeline/config/methods.config index c7ef8792..7007152c 100644 --- a/pipeline/config/methods.config +++ b/pipeline/config/methods.config @@ -106,6 +106,10 @@ params { docker { enabled = true sudo = params.sge_scheduler // Set to true if run on SGE - runOptions = "-u \$(id -u):\$(id -g)" - runOptions = "\$(for i in `id --real --groups`; do echo -n \"--group-add=\$i \"; done)" -} \ No newline at end of file + + // Pass user's UID/GID and group IDs to Docker + uid_and_gid = "-u \$(id -u):\$(id -g)" + all_group_ids = "\$(for i in `id --real --groups`; do echo -n \"--group-add=\$i \"; done)" + + runOptions = "${uid_and_gid} ${all_group_ids}" +} From dbe12e87c767c0a7987ba0d91c56f56ad83641d0 Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Thu, 4 Mar 2021 21:23:58 +0000 Subject: [PATCH 2/2] Set docker.sudo explicitly to boolean based on params.sge_scheduler --- pipeline/config/methods.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/config/methods.config b/pipeline/config/methods.config index 7007152c..2a12475e 100644 --- a/pipeline/config/methods.config +++ b/pipeline/config/methods.config @@ -105,7 +105,7 @@ params { // Enable docker docker { enabled = true - sudo = params.sge_scheduler // Set to true if run on SGE + sudo = (params.sge_scheduler) ? true : false // Set to true if run on SGE // Pass user's UID/GID and group IDs to Docker uid_and_gid = "-u \$(id -u):\$(id -g)"