mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/ocr.git
synced 2025-07-01 17:10:34 +00:00
Codestyle enhacements
This commit is contained in:
@ -17,7 +17,7 @@ GID = str(os.getgid())
|
||||
parser = ArgumentParser(add_help=False)
|
||||
parser.add_argument('-i', '--input-dir')
|
||||
parser.add_argument('-o', '--output-dir')
|
||||
parser.add_argument('-m', '--model', action='extend', dest='models', nargs='+')
|
||||
parser.add_argument('-t', '--model-file', action='extend', nargs='+')
|
||||
parser.add_argument('--log-dir')
|
||||
args, remaining_args = parser.parse_known_args()
|
||||
|
||||
@ -30,9 +30,9 @@ if args.output_dir is not None:
|
||||
mapping = f'{os.path.abspath(args.output_dir)}:{CONTAINER_OUTPUT_DIR}'
|
||||
cmd += ['-v', mapping]
|
||||
remaining_args += ['-o', CONTAINER_OUTPUT_DIR]
|
||||
if args.models is not None:
|
||||
for model in args.models:
|
||||
mapping = f'{os.path.abspath(model)}:{CONTAINER_MODELS_DIR}/{os.path.basename(model)}' # noqa
|
||||
if args.model_file is not None:
|
||||
for model_file in args.model_file:
|
||||
mapping = f'{os.path.abspath(model_file)}:{CONTAINER_MODELS_DIR}/{os.path.basename(model_file)}' # noqa
|
||||
cmd += ['-v', mapping]
|
||||
if args.log_dir is not None:
|
||||
mapping = '{os.path.abspath(args.log_dir)}:{CONTAINER_LOG_DIR}'
|
||||
|
Reference in New Issue
Block a user