Skip to content

Commit 86bc390

Browse files
authored
Merge pull request #2020 from mgxd/fix/wrapper-custom-templates
FIX: Properly mount local templates
2 parents 6620a12 + ac9da09 commit 86bc390

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

wrapper/fmriprep_docker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,12 @@ def main():
427427
spaces = []
428428
for space in opts.output_spaces:
429429
if space.split(':')[0] not in (TF_TEMPLATES + NONSTANDARD_REFERENCES):
430-
target = '/imports/' + os.path.basename(space)
430+
tpl = os.path.basename(space)
431+
if not tpl.startswith('tpl-'):
432+
raise RuntimeError("Custom template %s requires a `tpl-` prefix" % tpl)
433+
target = '/home/fmriprep/.cache/templateflow/' + tpl
431434
command.extend(['-v', ':'.join((os.path.abspath(space), target, 'ro'))])
432-
spaces.append(target)
435+
spaces.append(tpl[4:])
433436
else:
434437
spaces.append(space)
435438
unknown_args.extend(['--output-spaces'] + spaces)

0 commit comments

Comments
 (0)