Skip to content

Commit f7d9e11

Browse files
committed
Add --no-tty option to fmriprep-docker.py
1 parent 8480eab commit f7d9e11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

wrapper/fmriprep_docker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ def _is_file(path, parser):
325325
g_dev.add_argument('--network', action='store',
326326
help='Run container with a different network driver '
327327
'("none" to simulate no internet connection)')
328+
g_dev.add_argument('--no-tty', action='store_true',
329+
help='Run docker without TTY flag -it')
328330

329331
return parser
330332

@@ -393,9 +395,12 @@ def main():
393395
stdout=subprocess.PIPE)
394396
docker_version = ret.stdout.decode('ascii').strip()
395397

396-
command = ['docker', 'run', '--rm', '-it', '-e',
398+
command = ['docker', 'run', '--rm', '-e',
397399
'DOCKER_VERSION_8395080871=%s' % docker_version]
398400

401+
if not opts.no_tty:
402+
command.append('-it')
403+
399404
# Patch working repositories into installed package directories
400405
if opts.patch:
401406
for pkg, repo_path in opts.patch.items():

0 commit comments

Comments
 (0)