make-sense icon indicating copy to clipboard operation
make-sense copied to clipboard

how to run locally on macbook m1

Open santhoshnumberone opened this issue 2 years ago • 8 comments

Not able to run using npm

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

error

[+] Building 0.0s (1/2)                                                         
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 2B                                         0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount852360277/Dockerfile: no such file or directory
san@Santhoshs-MacBook-Pro makeS % git clone https://github.com/SkalskiP/make-sense.git
Cloning into 'make-sense'...
remote: Enumerating objects: 5405, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 5405 (delta 10), reused 29 (delta 7), pack-reused 5358
Receiving objects: 100% (5405/5405), 182.58 MiB | 9.90 MiB/s, done.
Resolving deltas: 100% (3505/3505), done.
san@Santhoshs-MacBook-Pro makeS % cd make-sense 
san@Santhoshs-MacBook-Pro make-sense % npm install
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: tslint-react is deprecated along with TSLint
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated @material-ui/[email protected]: You can now upgrade to @mui/system. See the guide: https://mui.com/guides/migration-v4/
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated @material-ui/[email protected]: You can now upgrade to @mui/styles. See the guide: https://mui.com/guides/migration-v4/
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated @material-ui/[email protected]: You can now upgrade to @mui/material. See the guide: https://mui.com/guides/migration-v4/
npm ERR! code 1
npm ERR! path /Users/s/Documents/makeS/make-sense/node_modules/@tensorflow/tfjs-node
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! CPU-darwin-3.9.0.tar.gz
npm ERR! * Downloading libtensorflow
npm ERR! /Users/s/Documents/makeS/make-sense/node_modules/@tensorflow/tfjs-node/scripts/install.js:103
npm ERR!     throw new Error(`Unsupported system: ${libType}-${platform}-${os.arch()}`);
npm ERR!           ^
npm ERR! 
npm ERR! Error: Unsupported system: cpu-darwin-arm64
npm ERR!     at getPlatformLibtensorflowUri (/Users/s/Documents/makeS/make-sense/node_modules/@tensorflow/tfjs-node/scripts/install.js:103:11)
npm ERR!     at downloadLibtensorflow (/Users/s/Documents/makeS/make-sense/node_modules/@tensorflow/tfjs-node/scripts/install.js:136:15)
npm ERR!     at async run (/Users/s/Documents/makeS/make-sense/node_modules/@tensorflow/tfjs-node/scripts/install.js:205:5)
npm ERR! 
npm ERR! Node.js v17.7.2

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/san/.npm/_logs/2022-04-30T11_14_31_603Z-debug-0.log

I don't know how to build using docker

santhoshnumberone avatar Apr 30 '22 11:04 santhoshnumberone

👋 Hello @santhoshnumberone, thank you for your interest in make-sense - free to use online tool for labelling photos! 🏷️

🐞 Bug reports

If you noticed that make-sense is not working properly, please provide us with as much information as possible. To make your life easier, we have prepared a bug report template containing all the relevant details. We know, we ask for a lot... However, please believe that knowing all that extra information - like the type of browser you use or the version of node you have installed - really helps us to solve your problems faster and more efficiently. 😉

💬 Get in touch

If you've been trying to contact us but for some reason we haven't responded to your issue yet, don't hesitate to get back to us on Gitter or Twitter.

💻 Local setup

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm start

To ensure proper functionality of the application locally, an npm 6.x.x and node.js v12.x.x versions are required. More information about this problem is available in the #16 issue.

github-actions[bot] avatar Apr 30 '22 11:04 github-actions[bot]

see tensorflow error here

rasyidf avatar Jul 23 '22 11:07 rasyidf

@rasyidf do you use Macbook M1?

SkalskiP avatar Jul 27 '22 17:07 SkalskiP

I don't have it ATM. my suggestion is to change the docker image with alpine linux and run it via docker. tensorflow js wasn't available in M1 yet. so perhaps if containerized. it will work.

another suggestion is to separate the tensorflow to be optional for mac M1

rasyidf avatar Jul 27 '22 17:07 rasyidf

perhaps because of this limitation. the only thing to consider is adding warning in the README.MD that for MacBook M1 users you have to use something like vercel or heroku.

I'll keep tracking the official repo of tfjs if it's available (M1 support).

rasyidf avatar Jul 27 '22 17:07 rasyidf

I don't have it ATM. my suggestion is to change the docker image with alpine linux and run it via docker. tensorflow js wasn't available in M1 yet. so perhaps if containerized. it will work.

whoa, I remember that containerized doesn't mean we changed the cpu and architecture.

if you have virtual machine with x86/ x64 OS inside. it will work.

rasyidf avatar Jul 27 '22 17:07 rasyidf

Oh... 😞. So in that, we have only one option: Try to make tf.js install optional based on the platform. And then turn off using tf.js in the UI for Macbook M1 users. They would be able to install the tool, but not to use all the features.

SkalskiP avatar Jul 27 '22 18:07 SkalskiP

or hack the way with custom build for M1 and paste into node_modules

rasyidf avatar Jul 28 '22 13:07 rasyidf

Hi @santhoshnumberone and @rasyidf I have MacBook with M1 now. I installed make-sense locally without any problems. For that reason I'm closing this issue. If similar problems will happen once again in the future we will of course reopen :)

SkalskiP avatar Nov 08 '22 10:11 SkalskiP