Closed mkaatman closed 4 years ago
Have you checked the Tensorflowjs issues page. I'm definitely sure this is a TFjs build issue.
Yeah I'm still going through their docs. I'm just surprised that it's so difficult to get it setup. Do you know if there's any docker image that already has it setup by chance?
I will go ahead and close this and post an update if I can figure it out.
This could very well be user error but it would be great if someone could either validate that something has gone terribly wrong or not.
Using proxmox container image: ubuntu-20.04-standard_20.04-1_amd64.tar.gz
Steps:
apt update && apt dist-upgrade
apt install nodejs npm
At this point here are my versions:
python2 --version // Python 2.7.18rc1
python3 --version // Python 3.8.2
nodejs --version // v10.19.0
npm --version // 6.14.4
Now time for the fireworks.
npm install danfojs-node
npm init -y
index.js:
For fun:
npm install @tensorflow/tfjs-converter@2.1.0 @tensorflow/tfjs-core@2.1.0 @tensorflow/tfjs-data@2.1.0 @tensorflow/tfjs-backend-webgl@2.1.0 @tensorflow/tfjs-backend-cpu@2.1.0 @tensorflow/tfjs-layers@2.1.0
Packages installed fine. Same result.
nano node_modules/danfojs-node/dist/index.js
nano node_modules/danfojs-node/dist/core/series.js
Uh oh, seems to be a tensorflow issue.
I kept going down the rabbit hole and because I don't know how to use a debugger on the node side, it was painful.
nano node_modules/@tensorflow/tfjs-node/dist/index.js
It fails on this line:
var bindings = require(bindingPath);
bindingPath is defined as:
var bindingPath = binary.find(path.resolve(path.join(__dirname, '/../package.json')));
logging bindingPath:
/root/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node
Aha!
npm install @tensorflow/tfjs-node
Then I installed nvm and node v14.9.0
npm rebuild @tensorflow/tfjs-node build-addon-from-source
Now my index.js consists only of:
import * as tf from '@tensorflow/tfjs-node';
And I'm still getting that ILLEGAL INSTRUCTION. Clearly not a danfo issue, but still hoping someone here can point me in the right direction.