Closed moustafa-a closed 4 years ago
Any progress on how to solve this issue?
I think tfjs-node
cannot run on Alpine linux. I have to change to Debian so that I can install necessary dependency. So if you use Docker, my suggestion is to use Debian-based image.
This works for me:
FROM node:buster-slim
COPY . .
RUN apt-get update && \
apt-get install -y build-essential \
wget \
python3 \
make \
gcc \
libc6-dev
RUN npm install
EXPOSE 3000
CMD [ "node", "index.js" ]
Is this likely to be resolved soon? Any other workarounds?
I think
tfjs-node
cannot run on Alpine linux. I have to change to Debian so that I can install necessary dependency. So if you use Docker, my suggestion is to use Debian-based image.This works for me:
FROM node:buster-slim COPY . . RUN apt-get update && \ apt-get install -y build-essential \ wget \ python3 \ make \ gcc \ libc6-dev RUN npm install EXPOSE 3000 CMD [ "node", "index.js" ]
Man !!! you are a saviour ✌🏻
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
Closing as stale. Please @mention us if this needs more attention.
Still having this errors was this solved?
I can confirm that I also have this issue.
Me,too
+1
+1
cc @pyu10055 @lina128
This issue might be related to how Alpine uses musl libc. From the FAQ:
Binary compatibility is much more limited, but it will steadily increase with new versions of musl. At present, some glibc-linked shared libraries can be loaded with musl, but all but the simplest glibc-linked applications will fail if musl is dropped-in in place of /lib/ld-linux.so.2.
Still does not work on Alpine. Can't use docker image for node 'node:16-alpine'
Is there any way to make it work on Alpine?
This is what my configuration looks like for the docker image.
FROM node:16.20-buster-slim as builder
RUN apt-get update && \
apt-get install -y python3-dev make gcc g++ git build-essential openssh-client openssl bash libc6-dev wget
Getting following issue
node_modules/lz4-asm/dist/lz4wasm.js:12
if(r)t=q?require("path").dirname(t)+"/":__dirname+"/",u=function(a,b){w||(w=require("fs"));x||(x=require("path"));a=x.normalize(a);return w.readFileSync(a,b?null:"utf8")},v=function(a){a=u(a,!0);a.buffer||(a=new Uint8Array(a));a.buffer||y("Assertion failed: undefined");return a},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(a){if(!(a instanceof z))throw a;}),process.on("unhandledRejection",y),n=function(a){process.exit(a)},
^
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /srv/reviews/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.so.2)
I think
tfjs-node
cannot run on Alpine linux. I have to change to Debian so that I can install necessary dependency. So if you use Docker, my suggestion is to use Debian-based image.This works for me:
FROM node:buster-slim COPY . . RUN apt-get update && \ apt-get install -y build-essential \ wget \ python3 \ make \ gcc \ libc6-dev RUN npm install EXPOSE 3000 CMD [ "node", "index.js" ]
Still facing issue with alpine, above solution seems to be working.
TensorFlow.js version
1.0.1
Describe the problem or feature request
Hi I'm trying to run tjfs-node in a Docker node:8-alpine image. I managed to install tfjs and tfjs-node but when I try to run my js code I get the following error:
Dockerfile
package.json