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

Add a linux/arm64 image for M1/M2 Macs #5

Closed
jaxn opened this issue Apr 21, 2023 · 4 comments
Closed

Add a linux/arm64 image for M1/M2 Macs #5

jaxn opened this issue Apr 21, 2023 · 4 comments

Comments

@jaxn
Copy link

jaxn commented Apr 21, 2023

When running evidencedev/devenv on a Mac, the following warning is displayed:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
@ud3sh
Copy link
Member

ud3sh commented May 12, 2023

@jaxn Are you able to work around this by adding the following argument
e.g
docker run -v=$(pwd):/evidence-workspace --rm -p=3000:3000 --platform=linux/arm64 -it evidencedev/devenv:latest

@jaxn
Copy link
Author

jaxn commented May 12, 2023

My workaround has been to just use a Codespace. I actually prefer it to running docker locally.

I did just try your suggestion. It seems to work fine on an existing project, but fails when using --init to create a new project.

Including the error below, but regardless I am going to continue using a Codespace instead of running docker locally.

➜  docker run -v=$(pwd):/evidence-workspace --rm -p=3000:3000 --platform=linux/arm64 -it evidencedev/devenv:latest --init
Starting Evidence.dev development environment mounted on /evidence-workspace in the container.
Provided arguments => --init
Starting with a blank template project.
> cloned evidence-dev/template#HEAD
> removed: .github/
npm WARN deprecated trim@1.0.1: Use String.prototype.trim() instead
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated 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.
npm ERR! code 1
npm ERR! path /evidence-workspace/node_modules/duckdb
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/evidence-workspace/node_modules/duckdb/lib/binding/duckdb.node --module_name=duckdb --module_path=/evidence-workspace/node_modules/duckdb/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@19.9.0 | linux | arm64
npm ERR! node-pre-gyp info check checked for "/evidence-workspace/node_modules/duckdb/lib/binding/duckdb.node" (not found)
npm ERR! node-pre-gyp http GET https://duckdb-node.s3.amazonaws.com/duckdb-v0.7.1-node-v111-linux-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://duckdb-node.s3.amazonaws.com/duckdb-v0.7.1-node-v111-linux-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for duckdb@0.7.1 and node@19.9.0 (node-v111 ABI, musl) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 403 Forbidden on https://duckdb-node.s3.amazonaws.com/duckdb-v0.7.1-node-v111-linux-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.9.0 | linux | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.9.0 | linux | arm64
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
npm ERR! gyp ERR! stack     at exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:439:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:483:16)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Linux 5.15.49-linuxkit
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/evidence-workspace/node_modules/duckdb/lib/binding/duckdb.node" "--module_name=duckdb" "--module_path=/evidence-workspace/node_modules/duckdb/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
npm ERR! gyp ERR! cwd /evidence-workspace/node_modules/duckdb
npm ERR! gyp ERR! node -v v19.9.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/evidence-workspace/node_modules/duckdb/lib/binding/duckdb.node --module_name=duckdb --module_path=/evidence-workspace/node_modules/duckdb/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/evidence-workspace/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Linux 5.15.49-linuxkit
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/evidence-workspace/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /evidence-workspace/node_modules/duckdb
npm ERR! node-pre-gyp ERR! node -v v19.9.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-05-12T18_35_09_308Z-debug-0.log

@ud3sh
Copy link
Member

ud3sh commented May 18, 2023

Thanks @jaxn for reporting this! It appears that the new DuckDb support requires pulling in python. Will create an issue.
Great to know Codespaces work well for you!

@ud3sh
Copy link
Member

ud3sh commented May 18, 2023

See #8 for requiring a python installation.

@ud3sh ud3sh closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants