From 997b13a64e1e224f77c4f1f39f0033d4750413de Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 23 Jul 2015 15:07:57 -0400 Subject: [PATCH] 5990: If --docker-image not specified, don't provide runtime_contraints.docker_image, use default server configuration. Update documentation. --- doc/user/topics/arv-run.html.textile.liquid | 2 +- sdk/python/arvados/commands/run.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/user/topics/arv-run.html.textile.liquid b/doc/user/topics/arv-run.html.textile.liquid index 9eabfacf70..8d1aca6305 100644 --- a/doc/user/topics/arv-run.html.textile.liquid +++ b/doc/user/topics/arv-run.html.textile.liquid @@ -134,7 +134,7 @@ Running pipeline qr1hi-d1hrv-slcnhq5czo764b1 h2. Additional options -* @--docker-image IMG@ : By default, commands run inside a Docker container created from the latest "arvados/jobs" Docker image. Use this option to specify a different image to use. Note: the Docker image must be uploaded to Arvados using @arv keep docker@. +* @--docker-image IMG@ : By default, commands run based in a container created from the @default_docker_image_for_jobs@ setting on the API server. Use this option to specify a different image to use. Note: the Docker image must be uploaded to Arvados using @arv keep docker@. * @--dry-run@ : Print out the final Arvados pipeline generated by @arv-run@ without submitting it. * @--local@ : By default, the pipeline will be submitted to your configured Arvados instance. Use this option to run the command locally using @arv-run-pipeline-instance --run-jobs-here@. * @--ignore-rcode@ : Some commands use non-zero exit codes to indicate nonfatal conditions (e.g. @grep@ returns 1 when no match is found). Set this to indicate that commands that return non-zero return codes should not be considered failed. diff --git a/sdk/python/arvados/commands/run.py b/sdk/python/arvados/commands/run.py index 4cbda4ae7d..be94e7304a 100644 --- a/sdk/python/arvados/commands/run.py +++ b/sdk/python/arvados/commands/run.py @@ -19,7 +19,7 @@ logger.setLevel(logging.INFO) arvrun_parser = argparse.ArgumentParser(parents=[arv_cmd.retry_opt]) arvrun_parser.add_argument('--dry-run', action="store_true", help="Print out the pipeline that would be submitted and exit") arvrun_parser.add_argument('--local', action="store_true", help="Run locally using arv-run-pipeline-instance") -arvrun_parser.add_argument('--docker-image', type=str, default="arvados/jobs", help="Docker image to use, default arvados/jobs") +arvrun_parser.add_argument('--docker-image', type=str, help="Docker image to use, otherwise use instance default.") arvrun_parser.add_argument('--ignore-rcode', action="store_true", help="Commands that return non-zero return codes should not be considered failed.") arvrun_parser.add_argument('--no-reuse', action="store_true", help="Do not reuse past jobs.") arvrun_parser.add_argument('--no-wait', action="store_true", help="Do not wait and display logs after submitting command, just exit.") @@ -249,11 +249,12 @@ def main(arguments=None): "repository": args.repository, "script_parameters": { }, - "runtime_constraints": { - "docker_image": args.docker_image - } + "runtime_constraints": {} } + if args.docker_image: + component["runtime_constraints"]["docker_image"] = args.docker_image + task_foreach = [] group_parser = argparse.ArgumentParser() group_parser.add_argument('-b', '--batch-size', type=int) -- 2.30.2