Node - tfjs (tensorflowjs in node) error: zsh: illegal hardware instruction node app.js - tensorflow.js

I am working with tensorflowjs in node. when i run the code, "const tf = require('#tensorflow/tfjs-node');" it throw an error "zsh: illegal hardware instruction node app.js".
i am using macbook air M1 chip.

Official #tensorflow/tfjs-node does not support Apple's M1 CPU just yet
There are unofficial ways to make it work (by using M1 build of tensorflow.so and rebuilding NodeJS bindings), but that is anything but trivial
UPDATE: as requested, a bit more info
there is Apple's port of Tensorflow that works on M1, but Apple stopped developing it and last update is from ~2 years: https://github.com/apple/tensorflow_macos
and there are several 3rd party ports, for example https://towardsdatascience.com/installing-tensorflow-on-the-m1-mac-410bb36b776
also, suggest going through TF's GitHub for M1 issues: https://github.com/tensorflow/tensorflow/issues?q=M1
in either case, once you have tensorflow, you still need to manually rebuild #tensorflow/tfjs-node so it binds to it which is non-trivial.

Related

Issues with setting up a Cardano node on macOS m1

I wanted to set up my own Cardano Node and followed the steps on this page https://developers.cardano.org/docs/get-started/installing-cardano-node. Has everything also more or less worked but at this point I get no further I get this error again and again Terminal Cabal All Errors
I think it has something to do with the M1 Chip, but it would be very kind if someone can help me

MAVProxy installed by Python can't find required modules

I installed droneapi in the same manner given in the tutorial. However, it's missing all of the important modules that come with MAVProxy, such as console, wx, etc.
Was it supposed to install these modules, or should I move them over from MAVProxy itself instead?
Note: Windows 8 64-bit platform
I apologize that you had to investigate the issue without guidance. Publishing our Windows installer was not well prioritized, and it looks like that choice cost you several hours.
Here is what we will soon to address DroneKit Python installation on Windows:
A dedicated Windows installer generator lives at windows/droneapiWinBuild.bat. This generates a program Output\DroneKitsetup-1.x.x.exe which can be used to install all dependencies.
Yesterday we began testing the installer on Windows on every commit. https://github.com/dronekit/dronekit-python/pull/236
We will now publish the binaries generated by that test and document them in the Windows installation process. https://github.com/dronekit/dronekit-python/issues/164
Thanks for publishing your solution publicly. Hopefully we can address issues like these before they come up in the future.
Tim, DroneKit Engineer
So in a rare spark of intuition I discovered the answer. The modules required by Dronekit Python can be installed in the following ways:
Console- type "pip install console" into the WinPython cmd prompt
WX- http://wiki.wxpython.org/How%20to%20install%20wxPython
OpenCV- Download and install OpenCV version 2.4, then copy/paste the file cv2.pyd from OpenCV\build\python\2.7\x64\ to \python-2.7.6.amd64\Lib\site-packages.
At this point it should load all required modules, although it will throw a few exceptions which aren't important.
As always, 3DR documentation is incomplete. One would think that $800 million dollar profits would mean that they could hire more than 5 programmers for their new platform...

What does Bad EIP value error means?

I've been writing some kernel module recently. For some modules everytime i insert them or remove them a huge kernel trace is shown on screen. The errors are somewhat like
ERROR: Bad EIP value.
or
ModuleName is tainted.
What does this imply. Any help is appreciated.
The Extended Instruction Pointer exists in x86 processors, but is somehow related to a missing WiFi driver, it seems:
Yesterday I could not reach this site and read your reactions, so I
experimented with several Linux versions: Xubuntu, Slacko-Puppy 5,4
Firefox ,Puppy Akita Beta and LinuxMintMaya. And with all the same
result, i.e. no result,
But in the last install - LinuxMintMaya - I discovered the problem,
which is be found here: http://www.linuxmint.com/rel_maya.php It
tells:
Boot hangs on systems using b43 wireless cards
So after entering this command
Code: sudo apt-get install firmware-b43-installer
LinuxMintMaya works.
To boot, the Mint page says:
An upstream issue in the kernel prevents Linux Mint 13 from booting on
computers with b43 wireless cards. If you're in this situation, try
the following:
To boot the live DVD, choose the "Compatibility mode" or add the
following kernel argument to the boot options: b43.blacklist=yes
Install Linux Mint on the hard drive If not present already, in Grub,
modify the boot options to add: b43.blacklist=yes Install the b43
firmware on the system

Meteor.js on Samsung ARMv71 Chromebook Series 3?

While there's no official support for Meteor.js on ARM architectures, I'm disappointed that my (new and lovely) Chromebook can't run Meteor within Unity (ubuntu 12.04 LTS) chroot via crouton - http://goo.gl/ilSFSz
I've tried the suggestions for the Raspberry Pi ARM here - https://github.com/meteor/meteor/issues/442 - and for the most part, I'm using node v0.8.24 outlined here - https://github.com/meteor/meteor/blob/devel/scripts/generate-dev-bundle.sh - and the latest error I received was a Assertion Error: Unsupported architecture when building mongodb here, line 298 in ../mongo/src/third_party/v8/SConscript:
processor = env[PROCESSOR_ARCHITECTURE]
And ARMv71 isn't listed, so I wondered if anyone has found a way to get Meteor.js to run natively on their armv71 chromebook? I would prefer not to use cloud9 or nitrous.io, or amazon ec2 to do meteor development on the Chromebook. Thanks in advance.
If you know sh or bash you could try modifying the meteor install script for the ARM architecture.
As I know from other users, our meteor universal arm fork should work for you.
https://github.com/4commerce-technologies-AG/meteor
Cheers
Tom

Wine is extremely slow, how do I find out why?

Recently I updated Wine (among other things) via port selfupdate from version 1.2 to version 1.4. After that it takes roughly a minute to start up, even simple things such as wine cmd or winecfg. CPU usage also spikes to about 140%.
I've tried completely removing and re-installing MacPorts (yes, I removed ~/.wine) and it's still as slow.
How do I get to the bottom of this?
On 2012-03-20 I updated fontconfig to 2.9.0_0; fontconfig is used by wine and other ports to find fonts. Unfortunately there was a problem where fontconfig did not create its cache files correctly, causing it to try to recreate them each time you use a program that uses fontconfig; this could take a minute or more, depending on your disk speed and how many fonts you have installed, since it's indexing all your fonts.
I updated fontconfig to 2.9.0_1 on 2012-03-27 with a patch to fix this so the usual "sudo port selfupdate" and "sudo port upgrade outdated" commands should fix this.

Resources