From 61c593b82b33eb6e63c19cb0eb63060894ed54a4 Mon Sep 17 00:00:00 2001 From: Ping Yu <4018+pyu10055@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:04:29 -0700 Subject: [PATCH] add doc for tfjs-node on mac with m1 (#6630) DOC --- tfjs-node/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tfjs-node/README.md b/tfjs-node/README.md index a48c945e17b..71dbe07e171 100644 --- a/tfjs-node/README.md +++ b/tfjs-node/README.md @@ -58,6 +58,19 @@ After that operation completes, re-run `yarn add` or `npm install` for the `@ten You only need to include `@tensorflow/tfjs-node` or `@tensorflow/tfjs-node-gpu` in the package.json file, since those packages ship with `@tensorflow/tfjs` already. +#### Mac OS X with M1 chip +For Mac with M1 chip, tfjs-node only support arm64 build. +To install tfjs-node, you need to ensure rosetta has been turned off on your terminal app. +Start your terminal and verify following command shows `arm64` as response: +``` +uname -m +``` +Install your node version with arm64 binary. You can verify that with following command also shows `arm64`: +``` +node -e 'console.log(os.arch())' +``` +Now you can install tfjs-node as described before. + #### Rebuild the package on Raspberry Pi To use this package on Raspberry Pi, you need to rebuild the node native addon with the following command after you installed the package: