tfjs-node fails to install correctly op Raspberry Pi

Created on 8 Apr 2020  路  3Comments  路  Source: tensorflow/tfjs

TensorFlow.js version

1.7.2 (and older ones too, however some very old versions do work on the rbi, like 1.2.11 do work)

Node version

12.14.1

Raspbian version

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Tested on a Pi 4 with 4GB of RAM

Describe the problem or feature request

After installing the tfjs-node dependency, the required rebuild step fails with the message: Unsupported system: cpu-linux-arm

Code to reproduce the bug / link to feature request

  • Create a dummy test folder named test
  • In that folder install the latest version of tfjs-node npm i @tensorflow/tfjs-node
  • Run the rebuild script as indicated by the readme (as per: https://github.com/tensorflow/tfjs/tree/master/tfjs-node#rebuild-the-package-on-raspberry-pi)
  • This results in an error:
> @tensorflow/[email protected] install /home/pi/test/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

CPU-linux-1.7.2.tar.gz
* Downloading libtensorflow
(node:15080) UnhandledPromiseRejectionWarning: Error: Unsupported system: cpu-linux-arm
    at getPlatformLibtensorflowUri (/home/pi/test/node_modules/@tensorflow/tfjs-node/scripts/install.js:95:11)
    at downloadLibtensorflow (/home/pi/test/node_modules/@tensorflow/tfjs-node/scripts/install.js:129:7)
    at async run (/home/pi/test/node_modules/@tensorflow/tfjs-node/scripts/install.js:190:5)
(node:15080) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15080) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@tensorflow/[email protected] /home/pi/test/node_modules/@tensorflow/tfjs-node

How can I install a recent version that does work on the rbpi?

node.js builinstall

Most helpful comment

FYI wanted to update that I found a similar issue also open and these instructions worked for me on a RPI 4 (in the meantime til this is resolved):

Similar issue: https://github.com/tensorflow/tfjs/issues/2872

Steps to work around: https://github.com/yhwang/node-red-contrib-tf-model

All 3 comments

Thanks @beele for reporting this issue. I'm also experiencing this exact issue. Thanks y'all for looking into it. :)

FYI wanted to update that I found a similar issue also open and these instructions worked for me on a RPI 4 (in the meantime til this is resolved):

Similar issue: https://github.com/tensorflow/tfjs/issues/2872

Steps to work around: https://github.com/yhwang/node-red-contrib-tf-model

@kangyizhang any progress on this?

Was this page helpful?
0 / 5 - 0 ratings