cwltool icon indicating copy to clipboard operation
cwltool copied to clipboard

Option for using self-hosted node:slim

Open Stikus opened this issue 3 years ago • 4 comments

Hello, it's not really a bug, but a feature request. We experienced this problem due to high amount of pools from docker hub in our IT department:

Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
ERROR.I'm sorry, I couldn't load this CWL file, try again with --debug for more information.
The error was: cwltool requires Node.js engine to evaluate and validate Javascript expressions, but couldn't find it.  Tried nodejs, node, docker run node:slim.

We are using self-hosted docker images for all our tools but node:slim. Can you add any option for setting which node:slim image use for JS validation?

Stikus avatar May 04 '22 07:05 Stikus

Agree, this would be very nice!

serge2016 avatar May 04 '22 07:05 serge2016

Dear @Stikus , thanks for your issue. I would accept a pull request that adds such an option. I'm happy to give some assistance to whoever wants to work on that.

As a workaround, installing nodejs locally removes the need to pull a container. You can also pre-cache the image in your container engine and tag it with node:slim even if it didn't come from docker.io.

Another workaround would be to configure docker to use your private mirror by default: https://stackoverflow.com/a/64158584

FYI, cwltool is meant for development of new versions of the CWL standard, and maybe local development of CWL workflows. If you need a production ready CWL runner, I suggest using one of the other conformant CWL implementations: https://www.commonwl.org/implementations/

mr-c avatar May 04 '22 08:05 mr-c

Thanks for workarounds - we decide to use local installation of nodejs for now.

I cannot provide PR for this feature, but I assume that variable should be passed to this line instead of constant: https://github.com/common-workflow-language/cwltool/blob/main/cwltool/sandboxjs.py#L84

            nodeimg = "docker.io/node:slim"

Stikus avatar May 04 '22 12:05 Stikus

Dear @mr-c, what do you think about the suggestion above? I think it would be great to have such an option

serge2016 avatar Feb 16 '24 11:02 serge2016