Hi Michael, Thanks a lot for your help! I was missing that I have to set the path and pass it to cwltool! Best, Sibylle
Hi! I have python script and a cwl wrapper for the script in the same directory. When I try to run the cwl I get an error because the python script can´t be found. It only works when I specifiy the absolut path to the script in baseCommand. Maybe anyone can give me a hint what I have to add, so the script is found by the cwl-runner? Thanks a lot!
1 answer
Hello sibyllewohlgemuth, thank you for your question.
If your tool isn't wrapped in a container, and it isn't installed on a standard system path, they you'll need to inform your CWL executor where to find it.
Don't forget to chmod a+x my_script.py and ensure that it starts with #!/usr/bin/env python or similar :-)
For example, with the reference implementation, set your PATH and pass in --preserve-environment PATH to cwltool:
PATH=$PATH:/absolute/path/to/the/directory/of/my/script cwltool --preserve-environment PATH my-tool.cwl my-inputs.yaml
If you are using a Docker container with your tool, then this is easy: configure the container to install your script to a standard path like /usr/bin
I hope this was helpful. Cheers,
If this answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Log in to answer this question.
Have you tried just using the relative path (i.e.,
./something.py)?Yes exactly, that is what I tried and what didn´t work. The file is only found when I used the absolute path.
Not being a CWL person, I assume the working directory is specified somewhere