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

TensorFlow nodes can't be installed due to Alpine image incompatibilty #378

Closed
2 tasks done
bonastreyair opened this issue Jun 3, 2023 · 2 comments
Closed
2 tasks done

Comments

@bonastreyair
Copy link

What are the steps to reproduce?

Installing node-red-contrib-teachable-machine (which has a dependency on @tensorflow/tfjs-node) as an excuse for installing a node that depends on tensorflow and needs a shared library ld-linux-x86-64.so.2.

What happens?

Checking the logs when starting node-red after installing the dependency you can find the following error:
[node-red-contrib-teachable-machine/teachable machine] Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/src/node-red/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.so.2)

Found some reference for an Alpine image that could be useful to solve the issue. I've given a try but had no success.
If you get an error similar to error loading shared library ld-linux-x86-64.so.2, it may be that you have dependencies relying on libc – you can try to fix this by adding RUN apk add --no-cache libc6-compat or RUN ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 to your Dockerfile. https://hub.docker.com/r/mhart/alpine-node/

What do you expect to happen?

I expect to run the official node-red image based on Alpine and be able to load nodes depending on TensorFlow.js, and that the libraries can be lodaded properly.

Please tell us about your environment:

  • Platform/OS: x86/Alpine (official docker image from node-red)

  • Browser: Safari and Chrome

@knolleary
Copy link
Member

With 3.1 we will be publishing Debian based images as well. You can try out the beta build now - see #340 (comment)

@bonastreyair
Copy link
Author

It actually works! 😎👌 waiting for final v3.1 release then 🤓

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

2 participants