Use variable instead of headcoded string

This commit is contained in:
Patrick Jentsch 2019-06-03 14:20:22 +02:00
parent f280b16b1b
commit 148e9e86e9

View File

@ -28,11 +28,11 @@ cmd = ['docker', 'run', '--rm', '-it', '-u', uid + ':' + gid]
if args.input_dir is not None: if args.input_dir is not None:
host_input_dir = os.path.abspath(args.input_dir) host_input_dir = os.path.abspath(args.input_dir)
cmd += ['-v', host_input_dir + ':' + container_input_dir] cmd += ['-v', host_input_dir + ':' + container_input_dir]
remaining_args += ['-i', '/input'] remaining_args += ['-i', container_input_dir]
if args.output_dir is not None: if args.output_dir is not None:
host_output_dir = os.path.abspath(args.output_dir) host_output_dir = os.path.abspath(args.output_dir)
cmd += ['-v', host_output_dir + ':' + container_output_dir] cmd += ['-v', host_output_dir + ':' + container_output_dir]
remaining_args += ['-o', '/output'] remaining_args += ['-o', container_output_dir]
cmd.append(container_image) cmd.append(container_image)
cmd += remaining_args cmd += remaining_args