@@ -187,7 +187,7 @@ def set_version(self):
187
187
self .add_envvar ((version_env , version ))
188
188
189
189
def add_envvar (self , envtuple ):
190
- """Set an environmental variable
190
+ """Set an environment variable
191
191
192
192
Inputs
193
193
------
@@ -197,7 +197,7 @@ def add_envvar(self, envtuple):
197
197
env = '=' .join (envtuple )
198
198
self .add_cmd (['-e' , env ])
199
199
elif self .service == 'singularity' :
200
- # singularity will transfer over environmental variables
200
+ # singularity will transfer over environment variables
201
201
# with the prefix: SINGULARITYENV_
202
202
envvar , value = envtuple
203
203
envvar = 'SINGULARITYENV_' + envvar
@@ -476,6 +476,12 @@ def _is_file(path, parser):
476
476
type = os .path .abspath ,
477
477
help = 'Filter file' ,
478
478
)
479
+ g_wrap .add_argument (
480
+ '--pooch-cache-dir' ,
481
+ metavar = 'DIR' ,
482
+ type = os .path .abspath ,
483
+ help = 'Directory to serve as cache for pooch files'
484
+ )
479
485
480
486
# Developer patch/shell options
481
487
g_dev = parser .add_argument_group (
@@ -643,6 +649,9 @@ def main():
643
649
if opts .deriv_filter_file :
644
650
container .add_mount (opts .deriv_filter_file , '/opt/derivative_filters.json' )
645
651
unknown_args .extend (['--deriv-filter-file' , '/opt/derivative_filters.json' ])
652
+ if opts .pooch_cache_dir :
653
+ container .add_mount (opts .pooch_cache_dir , '/tmp/pooch_cache' , read_only = False )
654
+ container .add_envvar (('NIBABIES_POOCH_DIR' , '/tmp/pooch_cache' ))
646
655
# Patch derivatives for searching
647
656
if opts .derivatives :
648
657
deriv_args = ['--derivatives' ]
0 commit comments