Install and Run Redash on Apple M1 Pro Chip

Issue Summary

Hi Redash community,

I was trying to install and run Redash using docker on my macbook with M1 Pro chip. I have ran into a number of errors when I followed the Docker Based Developer Installation Guide.

The first few errors happened during docker-compose when installing python packages. I managed to bypass those errors by adding pre steps in dockerfile and commenting a few packages in requirements_all_ds.txt file. They are:

  • add one step before install python packages in dockerfile:
    RUN pip install Cython;
    this is because pymssql will need Cython as a dependency, and it somehow has to be installed first.
  • comment pymapd and ibm-db as pyarrow and another dependency won’t work with M1 Chip

After fixing those errors, the containers were up and running, and localhost:5000/ping returns pong.

However I was later stuck at installing dependency for the front-end. I followed the instruction yarn --frozen-lockfile. It returned errors of
error An unexpected error occurred: "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz: read ECONNRESET".
and finally stopped at the stage of fetching packages. I managed to find another post in this forum talking about M1 chip issue and replaced the command with npm install && npm run build. Unfortunately, it returned the same error - error code EINTEGRITY.

As I don’t have much experience with frontend development and really desperate to find a solution to those errors, I just wonder if someone here has met the same problems and can shed a bit of light on this?

By the way, I tried another mac with Intel chip and under the same network, it works well with all those steps in the installation guide. So it can’t be the network issue.

The below are full logs for yarn --frozen--lockfile command

[14/06/22 4:07:44] (base)  ✘ jize@G536RR24R3  ~/Documents/GitHub/redash   master ±  yarn --frozen-lockfile
yarn install v1.22.19
$ cd viz-lib && yarn link --link-folder ../.yarn
yarn link v1.22.19
warning There's already a package called "@redash/viz" registered. This command has had no effect. If this command was run in another folder with the same name, the other folder is still linked. Please run yarn unlink in the other folder if you want to register this folder.
✨  Done in 0.03s.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
warning babel-cli > chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning babel-cli > babel-register > core-js@2.6.12: 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.
warning babel-cli > babel-polyfill > core-js@2.6.12: 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.
warning babel-cli > babel-runtime > core-js@2.6.12: 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.
warning babel-cli > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
info There appears to be trouble with your network connection. Retrying...
warning babel-cli > chokidar > readdirp > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
info There appears to be trouble with your network connection. Retrying...
warning babel-cli > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning babel-cli > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning babel-cli > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning babel-eslint@7.2.3: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz: read ECONNRESET".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jize/Documents/GitHub/redash/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
warning babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
info There appears to be trouble with your network connection. Retrying...
warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
info There appears to be trouble with your network connection. Retrying...
warning jest > jest-cli > sane@1.4.1: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning jest > jest-cli > jest-haste-map > sane@1.4.1: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning jest > jest-cli > jest-config > istanbul@0.4.5: This module is no longer maintained, try this instead:
  npm i nyc
Visit https://istanbul.js.org/integrations for other alternatives.
warning jest > jest-cli > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
info There appears to be trouble with your network connection. Retrying...
warning jest > jest-cli > jest-environment-jsdom > jsdom > request > har-validator@5.1.5: this library is no longer supported
warning jest > jest-cli > jest-environment-jsdom > jsdom > request > uuid@3.4.0: 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.
info There appears to be trouble with your network connection. Retrying...
warning webpack > watchpack > chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning webpack > node-libs-browser > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[2/4] 🚚  Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...

Technical details:

  • Redash Version: v10.1.0
  • Browser/OS: macOS Monterey 12.4, MacBook Pro with Apple M1 Pro
  • How did you install Redash: Following Docker Based developer installation guide.

Hey, I also encountered this song problem can not be solved!!!

Related context: Error: Unable to run docker-compose on Apple M1 Silicon - #16 by ajgreen

Hi @jesse ,

thanks for your reply. I checked that page before I made new post. It was one error I met before. I solved it by pointing node version to 14 in homebrew and after that, node and yarn commands can be triggered.
My error is when installing dependencies for the frontend, some packages look like not compatible with M1 chip. I’m not a front end developer, so it’s just my gut feeling. The error message was error An unexpected error occurred: "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz: read ECONNRESET".. Would you mind shedding some lights on?

Thanks,
Steve

Hmmm, I’ll give this a try on an M1 system when I have a moment.

This shouldn’t be a problem given that M1 supports Rosetta 2.0, no?