Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for using self-hosted node:slim #1659

Open
Stikus opened this issue May 4, 2022 · 4 comments
Open

Option for using self-hosted node:slim #1659

Stikus opened this issue May 4, 2022 · 4 comments

Comments

@Stikus
Copy link

Stikus commented May 4, 2022

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?

@serge2016
Copy link

Agree, this would be very nice!

@mr-c
Copy link
Member

mr-c commented May 4, 2022

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/

@Stikus
Copy link
Author

Stikus commented May 4, 2022

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"

@serge2016
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants