From a61816b2f53f296c5db4d9fa23a3d327d7274529 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 1 Nov 2024 15:56:12 -0400 Subject: [PATCH] fix: add --no-datalad-get for bids-mriqc invocation (current and future added) --- .datalad/config | 2 +- scripts/create_singularities | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.datalad/config b/.datalad/config index b481eb74..0b2deac1 100644 --- a/.datalad/config +++ b/.datalad/config @@ -47,7 +47,7 @@ cmdexec = {img_dspath}/scripts/singularity_cmd run {img} {cmd} image = images/bids/bids-mindboggle--0.0.4-1.sing [datalad "containers.bids-mriqc"] - cmdexec = {img_dspath}/scripts/singularity_cmd run {img} {cmd} + cmdexec = {img_dspath}/scripts/singularity_cmd run {img} --no-datalad-get {cmd} image = images/bids/bids-mriqc--24.0.2.sing [datalad "containers.bids-mrtrix3-connectome"] cmdexec = {img_dspath}/scripts/singularity_cmd run {img} {cmd} diff --git a/scripts/create_singularities b/scripts/create_singularities index b65e5402..2cbcae2e 100755 --- a/scripts/create_singularities +++ b/scripts/create_singularities @@ -268,6 +268,11 @@ export LC_ALL="C.UTF-8" str(imagefile), str(singfile.sourcefile), ) + base_opts = ' ' + if familyname == 'bids-mriqc': + # need to explicitly specify option to avoid use of datalad inside + # ref: https://github.com/ReproNim/containers/issues/131 + base_opts = ' --no-datalad-get ' self.runcmd( "datalad", "containers-add", @@ -276,7 +281,7 @@ export LC_ALL="C.UTF-8" str(imagefile), "--update", "--call-fmt", - "{img_dspath}/scripts/singularity_cmd run {img} {cmd}", + "{img_dspath}/scripts/singularity_cmd run {img}" + base_opts + "{cmd}", ) # TODO: later make it work with updating existing one. We will not # be able to use containers-add --update since original URL is