Open xzhub opened 6 years ago
Thanks for trying out CWL on REANA!
Here are three remarks:
(1) I can run your test well locally with cwltool
on a vanilla system (i.e. outside of the REANA platform) if I change sequences
to use class: File
in index.yml
.
(2) I have noticed that Docker runtime options are commented out in your sources... Note that this is a necessary pre-requirement for using REANA, because we are running computational workflows via containerisation. The mentioned issue was fixed in upstream cwltool
, so the line could be uncommented in bwa-index.cwl
.
(3) Finally, please use relative path, beacuse the absolute paths are not guaranteed to exist... Hence the input file should look like:
$ cat index.yml
sequences:
class: File
path: test.fa
After these three changes I can run your example fine on the REANA latest master
version.
First I create a reana.yaml
file looking like this:
$ cat reana.yaml
inputs:
parameters:
input: index.yml
environments:
- type: docker
image: scidap/bwa:v0.7.12
workflow:
type: cwl
file: bwa-index.cwl
and then use the usual reana-client commands to run the example.
This produces output files like:
$ reana-client list
NAME SIZE LAST-MODIFIED
inputs.json 51 2018-08-03 17:15:40.737827+00:00
workflow.json 1477 2018-08-03 17:15:40.737827+00:00
test.fa 159 2018-08-03 17:15:45.016826+00:00
cwl/docker_outdir/test.fa.sa 128 2018-08-03 17:15:45.013826+00:00
cwl/docker_outdir/test.fa.bwt 244 2018-08-03 17:15:45.000826+00:00
cwl/docker_outdir/test.fa.amb 8 2018-08-03 17:15:45.013826+00:00
cwl/docker_outdir/test.fa.ann 31 2018-08-03 17:15:45.013826+00:00
cwl/docker_outdir/test.fa.pac 39 2018-08-03 17:15:45.013826+00:00
cwl/docker_outdir/test.fa 159 2018-08-03 17:15:35.288830+00:00
cwl/outdir/6r6x_x/test.fa 159 2018-08-03 17:15:45.016826+00:00
P.S. If you are using REANA v0.2.0, your output will look slightly different (e.g.
reana-client outputs list`) because of master branch updates; but the example should work pretty much in the similar way.
P.S. Note also that for REANA v0.2.0 an older version of minikube is recommended, e.g. kubectl 1.9.1 and minikube 0.23.0.
Thanks @tiborsimko, I made some progress. After I fixed the absolute path issue in the index.yml, my command run through. However, There are still a couple issues:
$ reana-cwl-runner bwa-index.cwl index.yml
/home/user/p2-reana-cluster/bin/reana-cwl-runner 1.0.20180721142728
INFO:cwltool:/home/user/p2-reana-cluster/bin/reana-cwl-runner 1.0.20180721142728
Resolved 'bwa-index.cwl' to 'file:///reana/bwa-index.cwl'
INFO:cwltool:Resolved 'bwa-index.cwl' to 'file:///reana/bwa-index.cwl'
ERROR:root:{u'message': u'Workflow workspace created', u'workflow_id': u'3df25f22-4b60-490c-b8ad-f6d2c42991b1', u'workflow_name': u'cwl-runner.3'}
ERROR:root:{u'message': u'File successfully transferred'}
ERROR:root:Transferred file: /reana/test.fa
ERROR:root:{u'status': u'running', u'workflow_name': u'cwl-runner.3', u'workflow_id': u'3df25f22-4b60-490c-b8ad-f6d2c42991b1', u'user': u'00000000-0000-0000-0000-000000000000', u'organization': u'default', u'message': u'Workflow successfully launched'}
ERROR:root:Polling workflow logs
ERROR:root:/usr/local/bin/celery 0.2.0 with cwltool 1.0.20180326152342Search path is [u'/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/workflow.json#main', u'/root/.local/share/commonwl/workflow.json#main', u'/usr/local/share/commonwl/workflow.json#main', u'/usr/share/commonwl/workflow.json#main']Resolved 'workflow.json#main' to 'file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/workflow.json#main'
ERROR:root:Polling workflow logs
ERROR:root:[job workflow.json] initializing from file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/workflow.json[job workflow.json] {
"sequences": {
"class": "File",
"location": "file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa",
"size": 159,
"basename": "test.fa",
"nameroot": "test",
"nameext": ".fa"
}
}[job workflow.json] path mappings is {
"file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa": [
"/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa",
"/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/workspace/cwl/docker_outdir/test.fa",
"File",
false
]
}[job workflow.json] command line bindings is [
{
"position": [
-1000000,
0
],
"datum": "bwa"
},
{
"position": [
-1000000,
1
],
"datum": "index"
},
{
"prefix": "-a",
"position": [
0,
"algorithm"
],
"datum": null
},
{
"prefix": "-b",
"position": [
0,
"block_size"
],
"datum": null
},
{
"position": [
4,
"sequences"
],
"valueFrom": "$(self.basename)",
"datum": {
"class": "File",
"location": "file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa",
"size": 159,
"basename": "test.fa",
"nameroot": "test",
"nameext": ".fa",
"path": "/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/workspace/cwl/docker_outdir/test.fa",
"dirname": "/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/workspace/cwl/docker_outdir"
}
}
][job workflow.json] initial work dir {
"file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa": [
"/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa",
"/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/workspace/cwl/docker_outdir/test.fa",
"File",
true
]
}
ERROR:root:Polling workflow logs
ERROR:root:Polling workflow logs
ERROR:root:Polling workflow logs
ERROR:root:Copying /data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/inputs/test.fa to /data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/outputs/test.faFinal process status is success{
"output": {
"checksum": "sha1$10420f31c503a377d1750a2b64fea62e35fa505b",
"basename": "test.fa",
"location": "file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/outputs/test.fa",
"secondaryFiles": [],
"path": "/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/outputs/test.fa",
"class": "File",
"size": 159
}
}
{
"output": {
"checksum": "sha1$10420f31c503a377d1750a2b64fea62e35fa505b",
"basename": "test.fa",
"location": "file:///data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/outputs/test.fa",
"secondaryFiles": [],
"path": "/data/00000000-0000-0000-0000-000000000000/analyses/3df25f22-4b60-490c-b8ad-f6d2c42991b1/outputs/test.fa",
"class": "File",
"size": 159
}
}
I am using minikube 0.28 to start a kubenetes 1.64, and using python 2 with reana 0.20. I could run through the common-workflow-language test with only 3 failures. However, when I were testing with my downloaded CWL file, I couldn't get it run through.
For the test script of my own, here is the setup: