From 54700e80dc059a0aa70c109788827f6645b1fef0 Mon Sep 17 00:00:00 2001 From: Walt Shands Date: Thu, 27 Jul 2017 20:48:47 +0000 Subject: [PATCH 1/5] enable running of workflow vs tool enable running of workflow vs tool --- DockstoreRunner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DockstoreRunner.py b/DockstoreRunner.py index 6fa3bfa..1c9dea5 100644 --- a/DockstoreRunner.py +++ b/DockstoreRunner.py @@ -53,6 +53,9 @@ def __init__(self): parser.add_argument('--json-encoded', default='e30=', required=True) parser.add_argument('--docker-uri', default='quay.io/wshands/fastqc:latest', required=True) parser.add_argument('--dockstore-url', default='https://dockstore.org/containers/quay.io/wshands/fastqc', required=True) + parser.add_argument('--launch-type', default='tool', const='tool', nargs='?', + choices=['tool', 'workflow'], required=False, + help='run a workflow or tool (default: %(default)s)') parser.add_argument('--workflow-type', default='sequence_upload_qc_report', required=True) parser.add_argument('--parent-uuids', default='parent-UUID-dummy-value', required=True) # FIXME: this append seems to crash on the mac but it would be the way to go if we want multiple parents @@ -84,6 +87,7 @@ def __init__(self): self.dockstore_url = args.dockstore_url self.workflow_name = args.docker_uri.split(':')[0] self.workflow_version = args.docker_uri.split(':')[1] + self.launch_type = args.launch_type self.workflow_type = args.workflow_type self.parent_uuids = args.parent_uuids self.bundle_uuid = uuid4() @@ -447,7 +451,7 @@ def run(self): self.run_command(cmd, self.MAX_ATTEMPTS, self.DELAY_IN_SECONDS, True) print("Calling Dockstore to launch a Dockstore tool") - cmd = "dockstore tool launch --debug --entry "+self.docker_uri+" --json "+transformed_json_path + cmd = "dockstore " + self.launch_type + " launch --debug --entry "+self.docker_uri+" --json "+transformed_json_path self.run_command(cmd, self.MAX_PIPELINE_ATTEMPTS, self.DELAY_IN_SECONDS, cwd=self.tmp_dir) t_end = time.time() From d811bc4d5267eb0cb4fc8d8394361951461c11f0 Mon Sep 17 00:00:00 2001 From: Walt Shands Date: Thu, 27 Jul 2017 22:51:09 +0000 Subject: [PATCH 2/5] add support for workflow vs tool option add support for workflow vs tool option --- Dockstore.cwl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockstore.cwl b/Dockstore.cwl index 1495fb3..438246c 100644 --- a/Dockstore.cwl +++ b/Dockstore.cwl @@ -24,7 +24,9 @@ dct:creator: requirements: - class: DockerRequirement - dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16" + dockerPull: "walt_dockstore_tool_runner:1.0.0" +# dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16" + hints: - class: ResourceRequirement coresMin: 1 @@ -75,6 +77,12 @@ inputs: inputBinding: prefix: --workflow-type + launch_type: + type: string + doc: "String that describes the launch type: tool or workflow" + inputBinding: + prefix: --launch-type + parent_uuids: type: string doc: "UUIDs for parent" From 33388f8b21184d4da6d2d84c7c7bb0d7f35a529d Mon Sep 17 00:00:00 2001 From: Walt Shands Date: Thu, 27 Jul 2017 23:01:38 +0000 Subject: [PATCH 3/5] remove dockerpull for local image remove dockerpull for local image --- Dockstore.cwl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockstore.cwl b/Dockstore.cwl index 438246c..755f28d 100644 --- a/Dockstore.cwl +++ b/Dockstore.cwl @@ -24,8 +24,7 @@ dct:creator: requirements: - class: DockerRequirement - dockerPull: "walt_dockstore_tool_runner:1.0.0" -# dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16" + dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16" hints: - class: ResourceRequirement From 611e7a26970bee84a340784cb754b5438fcd877b Mon Sep 17 00:00:00 2001 From: Walt Shands Date: Thu, 27 Jul 2017 23:09:17 +0000 Subject: [PATCH 4/5] bump Dockstore tool runner image version and make launch_type optional bump Dockstore tool runner image version and make launch_type optional --- Dockstore.cwl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockstore.cwl b/Dockstore.cwl index 755f28d..badc455 100644 --- a/Dockstore.cwl +++ b/Dockstore.cwl @@ -24,7 +24,7 @@ dct:creator: requirements: - class: DockerRequirement - dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16" + dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17" hints: - class: ResourceRequirement @@ -77,7 +77,7 @@ inputs: prefix: --workflow-type launch_type: - type: string + type: string? doc: "String that describes the launch type: tool or workflow" inputBinding: prefix: --launch-type From ad41d978a33ce300d4bbe7606e6b3372b667a0c6 Mon Sep 17 00:00:00 2001 From: Carlos Espinosa Date: Thu, 27 Jul 2017 16:15:13 -0700 Subject: [PATCH 5/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cffb49..a21dc59 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Most people, other than developers of this tool, will use the Dockstore CLI to i # patch in /usr/local/lib/python2.7/dist-packages/cwltool # make a tmpdir like /datastore - docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 . + docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 . # fill in your JSON from Dockstore.json template as Dockstore.my.json mkdir /datastore; chown ubuntu:ubuntu /datastore/ # local execution @@ -107,7 +107,7 @@ Most people, other than developers of this tool, will use the Dockstore CLI to i # as root in /datastore TMPDIR=/datastore dockstore tool launch --entry ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl --local-entry --json ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.my.json # execute published on dockstore (this is the way most people will use this tool!) - dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 --json Dockstore.my.json + dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 --json Dockstore.my.json # running you see it launch the cwltool command, you mind find this useful while debugging cwltool --enable-dev --non-strict --enable-net --outdir /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/outputs/ --tmpdir-prefix /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/working/ /home/ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/workflow_params.json