Open delaaxe opened 1 year ago
I have the same issue
I think it's only meant for Linux at the moment
The docker base image is only available for amd64, the M1 architecture is arm64. You can tweak it to build for arm64, but you will come across with inline assembly that is incompatible, and it will crash while you are trying to build it
When you are running it, you are actually running it on a virtualized env (likely qemu)
@delaaxe @voidcenter @d-roak There will soon be a release that removes the assembly in question, allowing for the docker image to be built on arm64 (I successfully built it on an M1 Mac).
@delaaxe @voidcenter @d-roak it should now be possible to build the docker on M1 Mac. Please confirm so the issue can be closed.
@iliav-starkware can you tell me which commit fixed the M1 Mac docker build and what was the change that fixed it? It seems that you are still using inline assembly on some files e.g. src/starkware/algebra/fields/prime_field_element.S
Just saw the --build-arg CMAKE_ARGS=-DNO_AVX=1
added flag
@d-roak is it working?
@iliav-starkware it still fails for me, i'll try again from scratch but full build takes 3h+ on my laptop
@iliav-starkware tl;dr: no
The base image continues to be an amd64 image, so you will build it in a virtualized environment that will take a LONG time to build, and according to @delaaxe, it still fails
If u change the base image to one that can build on aarch64, and pass the new --build-arg CMAKE_ARGS=-DNO_AVX=1
, it will stop having the inline assembly issue, but it will fail while building the the blake2 dependency. If you want, I can open a PR with the tweaks for building the aarch64 docker image for you to test around
I confirm still same error
Good afternoon Guys, You can try to Follow this algorithm! 1)Install Docker Desktop for Mac: Ensure that you have Docker Desktop installed on your M1 MacBook. Docker Desktop for Mac supports both Intel and ARM64 architectures.
2)Configure Docker CLI for ARM64: Open Terminal and run the following command to configure Docker CLI to use the ARM64 architecture:
bash Copy code docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 3)Build Docker Image: Navigate to the directory containing your Dockerfile and application code. Run the following command to build the Docker image:
bash Copy code docker build -t your_image_name . 4)Run Docker Container: Once the image is built, you can run a container from it:
bash Copy code docker run -p 8080:80 your_image_name Adjust the ports and other options according to your application.
5)Test the Container: Open a web browser or use a tool like curl to test your application running inside the Docker container. Enjoy!
Hum.. Chat gpt?
try chat gpt
that won't work, i can say it with confidence without trying 😅
@iliav-starkware tl;dr: no
The base image continues to be an amd64 image, so you will build it in a virtualized environment that will take a LONG time to build, and according to @delaaxe, it still fails
If u change the base image to one that can build on aarch64, and pass the new
--build-arg CMAKE_ARGS=-DNO_AVX=1
, it will stop having the inline assembly issue, but it will fail while building the the blake2 dependency. If you want, I can open a PR with the tweaks for building the aarch64 docker image for you to test around
What blake dependency? Can you elaborate?
I deleted the repo from my laptop so I can't reproduce it to check the exact error. But there was some error while compiling this file: https://github.com/starkware-libs/stone-prover/blob/main/src/third_party/blake2/blake2s.c
But this error is only relevant if you want to port your docker configuration to work both on amd64 and aarch64 natively. Your current approach seems to be working natively on amd64 and virtualized on aarch64, for that I don't know the exact error. @delaaxe might be able to give you more details on that since he tested it
Closed due to inactivity.
I didn't follow up on the issue in the latest updates, but if it was not marked as solved, it seems weird to close it due to inactivity. The latest answers were not dismissed with a solution or a won't fix.
Apologies, the message was intended for another PR. Installation is only possible on Linux platforms and support for other platforms is WIP. I'll reopen this issue in the meantime.
Just wanted to add my comments here:
While it's slow, it works.
Running the command
docker build --tag prover .
fails at the stepRUN ctest -V
: