X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1c95615a417b6435dc86f80e3f02563196449611..5d039c344850dfc5fedd03c1050fa51eec404d72:/sdk/cwl/arvados_cwl/__init__.py diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 71ef742e31..c73b358ecc 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -152,6 +152,10 @@ def arg_parser(): # type: () -> argparse.ArgumentParser help="When invoked with --submit --wait, always submit a runner to manage the workflow, even when only running a single CommandLineTool", default=False) + parser.add_argument("--match-submitter-images", action="store_true", + default=False, dest="match_local_docker", + help="Where Arvados has more than one Docker image of the same name, use image from the Docker instance on the submitting node.") + exgroup = parser.add_mutually_exclusive_group() exgroup.add_argument("--submit-request-uuid", default=None, @@ -209,6 +213,10 @@ def arg_parser(): # type: () -> argparse.ArgumentParser parser.add_argument("--http-timeout", type=int, default=5*60, dest="http_timeout", help="API request timeout in seconds. Default is 300 seconds (5 minutes).") + exgroup = parser.add_mutually_exclusive_group() + exgroup.add_argument("--enable-preemptible", dest="enable_preemptible", default=None, action="store_true", help="Use preemptible instances. Control individual steps with arv:UsePreemptible hint.") + exgroup.add_argument("--disable-preemptible", dest="enable_preemptible", default=None, action="store_false", help="Don't use preemptible instances.") + parser.add_argument( "--skip-schemas", action="store_true", @@ -250,14 +258,20 @@ def add_arv_hints(): "http://arvados.org/cwl#ReuseRequirement", "http://arvados.org/cwl#ClusterTarget", "http://arvados.org/cwl#OutputStorageClass", - "http://arvados.org/cwl#ProcessProperties" + "http://arvados.org/cwl#ProcessProperties", + "http://commonwl.org/cwltool#CUDARequirement", + "http://arvados.org/cwl#UsePreemptible", ]) def exit_signal_handler(sigcode, frame): logger.error(str(u"Caught signal {}, exiting.").format(sigcode)) sys.exit(-sigcode) -def main(args, stdout, stderr, api_client=None, keep_client=None, +def main(args=sys.argv[1:], + stdout=sys.stdout, + stderr=sys.stderr, + api_client=None, + keep_client=None, install_sig_handlers=True): parser = arg_parser()