diff --git a/src/sophios/main.py b/src/sophios/main.py index e7ba57a0..23837057 100644 --- a/src/sophios/main.py +++ b/src/sophios/main.py @@ -204,7 +204,7 @@ def main() -> None: # `docker run` will NOT query the remote repository for the latest image! # cwltool has a --force-docker-pull option, but this may cause multiple pulls in parallel. if args.container_engine == 'singularity': - cmd = ['cwl-docker-extract', f'-s --dir {args.homedir}', f'autogenerated/{yaml_stem}.cwl'] + cmd = ['cwl-docker-extract', '-s', '--dir', f'{args.homedir}', f'autogenerated/{yaml_stem}.cwl'] else: cmd = ['cwl-docker-extract', '--force-download', f'autogenerated/{yaml_stem}.cwl'] sub.run(cmd, check=True) diff --git a/src/sophios/run_local.py b/src/sophios/run_local.py index 0b8436af..57034123 100644 --- a/src/sophios/run_local.py +++ b/src/sophios/run_local.py @@ -134,7 +134,13 @@ def run_local(args: argparse.Namespace, rose_tree: RoseTree, cachedir: Optional[ cachedir_ = ['--cachedir', cachedir] if cachedir else [] net = ['--custom-net', args.custom_net] if args.custom_net else [] provenance = ['--provenance', f'provenance/{yaml_stem}'] if not args.no_provenance else [] - docker_cmd_ = [] if docker_cmd == 'docker' else ['--user-space-docker-cmd', docker_cmd] + docker_cmd_: List[str] = [] + if docker_cmd == 'docker': + docker_cmd_ = [] + elif docker_cmd == 'singularity': + docker_cmd_ = ['--singularity'] + else: + docker_cmd_ = ['--user-space-docker-cmd', docker_cmd] write_summary = ['--write-summary', f'output_{yaml_stem}.json'] path_check = ['--relax-path-checks'] # See https://github.com/common-workflow-language/cwltool/blob/5a645dfd4b00e0a704b928cc0bae135b0591cc1a/cwltool/command_line_tool.py#L94 @@ -205,7 +211,13 @@ def run_local(args: argparse.Namespace, rose_tree: RoseTree, cachedir: Optional[ # NOTE: toil-cwl-runner always runs in parallel net = ['--custom-net', args.custom_net] if args.custom_net else [] provenance = ['--provenance', f'provenance/{yaml_stem}'] if not args.no_provenance else [] - docker_cmd_ = [] if docker_cmd == 'docker' else ['--user-space-docker-cmd', docker_cmd] + docker_cmd_ = [] + if docker_cmd == 'docker': + docker_cmd_ = [] + elif docker_cmd == 'singularity': + docker_cmd_ = ['--singularity'] + else: + docker_cmd_ = ['--user-space-docker-cmd', docker_cmd] path_check = ['--relax-path-checks'] # See https://github.com/common-workflow-language/cwltool/blob/5a645dfd4b00e0a704b928cc0bae135b0591cc1a/cwltool/command_line_tool.py#L94 # https://github.com/DataBiosphere/toil/blob/6558c7f97fb37c6ef6f469c7ae614109050322f4/src/toil/options/cwl.py#L152