Open studentofcoding opened 2 years ago
Thank you for taking the time to open this.
This is odd, because the solana
cli is being installed on Linux (Ubuntu20.04). This is the whole point of using Docker.
I will investigate this further, but it seems the issue has to do with the curl request being blocked by your workspace. I suggest seeing if you can access the URL in your browser.
I would double-check your DNS settings as well as firewall which could be blocking the request.
Facing the similar issue as well on M1, looks like this is ARM-specific problem since there's a dude on Discord getting the same trouble.
has anyone run into docker issue, when running on the new M1
managed to resolve above Docker issue, not getting stuck here, when it is building the Dockerfile
=> ERROR [13/19] RUN sh -c "$(curl -sSfL https://release.solana.com/stab 2.1s
[2022-09-23T08:37:26.179Z]
------
> [13/19] RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)":
#0 1.116 downloading stable installer
#0 2.022 curl: (22) The requested URL returned error: 403
#0 2.043 solana-install-init: command failed: downloader https://release.solana.com/stable/solana-install-init-aarch64-unknown-linux-gnu /tmp/tmp.TLQ5Qw4STt/solana-install-init
------
[2022-09-23T08:37:26.179Z] ERROR: failed to solve: executor failed running [/bin/sh -c sh -c "$(curl -sSfL https://release.solana.com/stable/install)"]: exit code: 1
While we are still looking for a fix, we suggest running the course in Gitpod:
NOTE: The course tools are complex, and we have not confirmed every project/lesson will work in Gitpod either.
a workaround for now, i downloaded the install
file and changed the Dockerfile
to execute it locally
# Solana
#RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
CMD install
Did some testing on my M1 Air last week and ran into this issue as well.
I believe it's because Solana's install script takes the container's CPU type into account when deciding which version to download and install. And it seems that, unless a platform is specified, Docker will try to pull an Ubuntu image that's closest to the host's CPU type, which for M1 is aarch64 / ARM64.
Then for Solana, it turns out there are no prebuilt aarch64 version for Linux, just x86_64 / amd64. There are other aarch64 builds, but only for Apple machines: https://github.com/solana-labs/solana/releases/tag/v1.14.2
It's possible to force Docker to build a container using x86_64 Ubuntu with FROM --platform=linux/amd64 ubuntu:20.04
. This seems to work, and Solana can install properly while building the container and in one of the early lesson steps.
But once you hit the solana-test-validator
step, you'd probably get the following error message: Incompatible CPU detected: missing AVX support. Please build from source on the target
.
Turns out that M1 / M2 CPUs don't support AVX or AVX2 instructions, which solana-test-validator
uses under the hood. It should be possible to compile Solana from source to get around that, but I ran into some issues while doing that inside the x86_64 Ubuntu container.
The easiest thing for people with M1 / M2 machines to do would be to use GitPod or something similar like @ShaunSHamilton mentioned. Then the container should be built on an x86 machine, and shouldn't run into the same issue with solana-test-validator
and the lack of AVX2 support.
failing install on new M1 as well with devcontainer.json.
[dev_container_auto_added_stage_label 13/19] RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)":
0 1.477 downloading stable installer
0 3.600 curl: (22) The requested URL returned error: 403
0 3.609 solana-install-init: command failed: downloader https://release.solana.com/stable/solana-install-init-aarch64-unknown-linux-gnu /tmp/tmp.snPZp3xpUo/solana-install-init
[2022-10-22T18:26:00.652Z] ERROR: failed to solve: executor failed running [/bin/sh -c sh -c "$(curl -sSfL https://release.solana.com/stable/install)"]: exit code: 1 [2022-10-22T18:26:00.657Z] Stop (9533 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/xk/7pnplynn383f5ld8wbd2t_8r0000gn/T/devcontainercli/container-features/0.20.0-1666463151087/Dockerfile-with-features -t vsc-solana-curriculum-00a53c8e8217084823e448bec660d7f9 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/var/folders/xk/7pnplynn383f5ld8wbd2t_8r0000gn/T/devcontainercli/container-features/0.20.0-1666463151087 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /Users/codingxjourney/solana-curriculums/solana-curriculum [2022-10-22T18:26:00.658Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/xk/7pnplynn383f5ld8wbd2t_8r0000gn/T/devcontainercli/container-features/0.20.0-1666463151087/Dockerfile-with-features -t vsc-solana-curriculum-00a53c8e8217084823e448bec660d7f9 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/var/folders/xk/7pnplynn383f5ld8wbd2t_8r0000gn/T/devcontainercli/container-features/0.20.0-1666463151087 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /Users/codingxjourney/solana-curriculums/solana-curriculum [2022-10-22T18:26:00.658Z] at Vse (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.4/dist/spec-node/devContainersSpecCLI.js:1869:1635) [2022-10-22T18:26:00.658Z] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
a workaround for now, i downloaded the
install
file and changed theDockerfile
to execute it locally# Solana #RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)" CMD install
it's worked. Thank you!
a workaround for now, i downloaded the
install
file and changed theDockerfile
to execute it locally# Solana #RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)" CMD install
it's worked. Thank you!
not working for me
@branddesade What errors can you see in the logs?
works on my windows but not my m1 mac too
This really needs a fix, Mac M\d based machines aren't exactly rare in the dev community.
Project
Installation process
Lesson Number
-
Issue/Experience
I think it only supports linux for now?
Code and Screenshots