Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to run locally on macbook m1 #246

Closed
santhoshnumberone opened this issue Apr 30, 2022 · 9 comments
Closed

how to run locally on macbook m1 #246

santhoshnumberone opened this issue Apr 30, 2022 · 9 comments
Assignees
Labels
needs-review The problem described requires deeper analysis.

Comments

@santhoshnumberone
Copy link

santhoshnumberone commented Apr 30, 2022

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

@github-actions
Copy link

👋 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.

@rasyidf
Copy link
Contributor

rasyidf commented Jul 23, 2022

see tensorflow error here

@SkalskiP
Copy link
Owner

@rasyidf do you use Macbook M1?

@rasyidf
Copy link
Contributor

rasyidf commented Jul 27, 2022

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
Copy link
Contributor

rasyidf commented Jul 27, 2022

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
Copy link
Contributor

rasyidf commented Jul 27, 2022

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.

@SkalskiP
Copy link
Owner

SkalskiP commented Jul 27, 2022

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.

@rasyidf
Copy link
Contributor

rasyidf commented Jul 28, 2022

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

@SkalskiP SkalskiP self-assigned this Nov 8, 2022
@SkalskiP SkalskiP added the needs-review The problem described requires deeper analysis. label Nov 8, 2022
@SkalskiP
Copy link
Owner

SkalskiP commented Nov 8, 2022

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 SkalskiP closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review The problem described requires deeper analysis.
Projects
None yet
Development

No branches or pull requests

3 participants