TensorFlow nodes can't be installed due to Alpine image incompatibilty
bonastreyair opened this issue · comments
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/
- sgerrand/alpine-pkg-glibc#194 - Related Alpine opened issue
- Installing
build-base
gcompat
libc6-compat
did not solve the issue.
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
With 3.1 we will be publishing Debian based images as well. You can try out the beta build now - see #340 (comment)