Open GitHelge opened 2 years ago
Hey @GitHelge,
Things may have recently changed and I will investigate, but I believe TensorflowJS was not working with the new M1 MacBooks when I tried it on mine... While I investigate, maybe you could consider trying to Dockerize the project your working on to run it.
Im currently working on the dockerization, but I cannot get it to run.
I used npm i --legacy-peer-deps
Dockerfile:
FROM node:16.13.1-alpine3.12
WORKDIR /app
COPY package.json ./
# Stuff for another library:
RUN apk add --update --no-cache \
make \
g++ \
jpeg-dev \
cairo-dev \
giflib-dev \
pango-dev \
libtool \
autoconf \
automake \
libc6-compat
# RUN npm install
COPY . ./
RUN npm install --legacy-peer-deps
Installation fails with:
#10 10.74 npm ERR! code 1
#10 10.74 npm ERR! path /app/node_modules/@tensorflow/tfjs-node
#10 10.75 npm ERR! command failed
#10 10.75 npm ERR! command sh -c node scripts/install.js
#10 10.75 npm ERR! CPU-linux-3.12.0.tar.gz
#10 10.75 npm ERR! * Downloading libtensorflow
#10 10.75 npm ERR! /app/node_modules/@tensorflow/tfjs-node/scripts/install.js:106
#10 10.75 npm ERR! throw new Error(`Unsupported system: ${libType}-${platform}-${os.arch()}`);
#10 10.75 npm ERR! ^
#10 10.75 npm ERR!
#10 10.75 npm ERR! Error: Unsupported system: cpu-linux-arm64
#10 10.75 npm ERR! at getPlatformLibtensorflowUri (/app/node_modules/@tensorflow/tfjs-node/scripts/install.js:106:11)
#10 10.75 npm ERR! at downloadLibtensorflow (/app/node_modules/@tensorflow/tfjs-node/scripts/install.js:139:15)
#10 10.75 npm ERR! at async run (/app/node_modules/@tensorflow/tfjs-node/scripts/install.js:208:5)
#10 10.76
#10 10.76 npm ERR! A complete log of this run can be found in:
#10 10.76 npm ERR! /root/.npm/_logs/2021-12-29T22_14_19_027Z-debug.log
An update: tfjs-node recently merged a PR with an update for running on cpu-darwin-arm64 but not for cpu-linux-arm64. I tried with a simulated amd64 build but ran into different issues. 😅
Hey there, currently, I get an error on installing this library with
npm i
If I try with
npm i --legacy-peer-deps
, it does run through, but im not sure if this is the solution.Does anyone have an idea how this could be solved?
My package.json:
System: Mac M1 Big Sur 11.6
Node version: v14.17.6, v16.13.1 (current) npm version: 8.0.0, 8.1.2 (current)