> :thumbsup: [SOLUTION] #MacUsers: Many thanks...
# docker
c
👍 [SOLUTION] #MacUsers: Many thanks @numerous-kitchen-79937 @famous-address-39053 @average-branch-45579 @happy-addition-42792 I encountered this error:
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
• Double check if you are using Docker Compose V1
docker-compose version
• Double check docker on terminal
which docker-compose
and if you see the output
/opt/homebrew/bin/docker-compose
it’s not supposed to be installed with brew, docker for mac handles that itself.
brew uninstall docker-compose
to uninstall it.
• On Docker desktop app make sure to uncheck “Use Docker Compose V2” from the setting. Now try to reinstall the project.
• For M1 users could be that for some reason terminal works in x86 mode and because of this docker could not work when you start command from terminal. This command could help to switch terminal to the right mode (for zsh)
env /usr/bin/arch -arm64 /bin/zsh --login
• There is a PR branch that specifically works on M1 Macs Apple m1 adjustments by volhov · Pull Request #225 · spryker/docker-sdk
• So pull the docker SDK as normal using:
git clone <https://github.com/spryker/docker-sdk.git> --single-branch docker
• Then cd into the docker directory:
cd docker
• Now fetch and checkout the PR branch:
git fetch origin pull/225/head:apple-m1-adjustments
•
git checkout apple-m1-adjustments
• Come back up to the main directory:
cd ../
• Then re-run the bootstrap:
docker/sdk bootstrap deploy.dev.yml
• Now run the SDK again:
docker/sdk up
• You will most likely run into this error:
unable to reconcile Mutagen sessions: unable to flush synchronization session(s): unable to flush session: session is not currently able to synchronize
• run:
docker/sdk trouble
• and then run
docker/sdk up
again
Booomm!!! It works 🎉
👏 5
đź‘€ 2
🙌 1
❤️ 5
👍 4
âś… 1
n
Hey! I’m so glad you got this sorted and I wish I could have helped more. Many thanks for sharing your solution back with the community… I will write this up in my companies Confluence and share it back with any new Spryker learners who ask. 👍 👍
❤️ 1
f
@average-branch-45579 would be nice if we could get all of this written down in the official docs. Perhaps even a dedicated M1 setup page with troubleshooting FAQs? There's already been a lot of issues with the M1s and the same questions/issues will keep popping up in the future...
👍 1
a
As soon as there is official support of M1 probably. But I'll forward this internally to people responsible of this.
h
when will that be @average-branch-45579?
s
Speaking of which: When are you planning to merge this PR? is there any timeline or any blockers that still need fixing? New devs will only get M1 machines if you don’t want to buy refurbished and stay on the Mac path.
a
The plan is to have this Q1 AFAIK.
âś… 1
c
@average-branch-45579 who from Spryker is in lead (owner) when it comes to this topic?
a
hi! you can contact me
c
Thank you so much for this!! In combination with https://sprykercommunity.slack.com/archives/CMYFJCG2E/p1643812049583259?thread_ts=1642429030.002900&amp;cid=CMYFJCG2E I was finally able to get the demo-shop running on my M1 machine! 🥳
👏 1
m
Hello everyone... sooner or later it had to be my turn to struggle with ARM architecture.... I followed all the advice in the channel... Good! The installation starts, but then in the Build-static section it seems to fail.... If i run the command
npm ci --prefer-offline
directly in the cli then i got the following error (see second screenshot attached) On Intel Mac everything is working good. Node-Sass dependency in package.json is
~4.14.1
that should be compatible with node v.14 installed in cli image. But if u see better, it try to download a binary that does not exits (maybe with wrong arch ?).... OT: why we use still node-sass and not dart-sass?? Then we will have no dependecies more from which version of node and g++, make, python2 etc.... @average-branch-45579 U can sure help me... maybe the same problem was posted in another thread but I missed it... Thank in advance an all for your help/suggestion etc...
i forgot -> Image used is:
spryker/php:8.0-alpine3.13
f
iirc there were some issues with building zed ui on my m1 -> they weren’t built properly during project installation - something about wrong arch for some npm module(s) (might be exactly that one from your screenshot)
the fix was to manually run the zed ui build command directly from the console…
m
Yes, the node-sass try to download a binary for wrong arch... I think that the better solution is to switch to dart-sass...
f
but my project install did not stop because of the failing asset build, so not sure if it’s the same issue as you are having right now
maybe as a workaround remove the asset build from the project install script, and then build them manually post install
m
yes... i can try so.. but i don't understand why the others say that everything works on m1...
i will try to replace node-sass with dart-sass (there is also a PR in private repo suite on spryker since 1 year still open.... i don't understand why spryker don't switch to dart-sass)
f
everything
is a bit of an overstatement, but
most things
definitely do work. you need some workarounds here and there, and docker is significantly slower than on intels, but it’s at least usable…
m
what mean with "slower" ??? too slower or what? some peopel in channel say also that it run very fast
f
the m1 cpu itself is extremely fast - but that does not translate to docker as there’s (afaik) 2 layers of virtualization happening when running docker images on m1
I did a lot of performance tests 2 months ago - m1 ended up being 2-4 times slower than intel
Copy code
+-------------------------------+------------------+-------------------------+----------------------+
| benchmark                     | WSL2 - optimized | Mac - Intel - optimized | Mac - M1 - optimized |
+-------------------------------+------------------+-------------------------+----------------------+
| HomePageBench                 | 63.338ms         | 231.712ms               | 1.028s               |
| CatalogPageBench              | 481.861ms        | 1.240s                  | 5.422s               |
| LoginBench                    | 312.840ms        | 391.086ms               | 1.023s               |
| AddToGuestCartBench           | 146.357ms        | 182.833ms               | 624.561ms            |
| ConsoleTransferGenerateBench  | 1.793s           | 2.353s                  | 9.280s               |
| ConsoleFrontendYvesBuildBench | 1.265m           | 2.551m                  | 5.611m               |
+-------------------------------+------------------+-------------------------+----------------------+
this would be a summary of those tests
though to be fair, a lot could have changed since then, so I’m hoping the final version of spryker’s m1 images will be at least as fast as the intels…
🙏 1
m
With apple-m1 experimental branch and dart-sass instead node-sass it works on m1 and it is very fasttttt... faster als my intel mac
👍 1
t
Updating
@spryker/oryx-for-zed
to the latest version (2.11.4) worked for me as well. Thank you for the hint @mammoth-autumn-37948!
👍 1
a
why we use still node-sass and not dart-sass?
https://api.release.spryker.com/release-group/3279
👌 1
s
HI A @lively-france-63418 Let follow this thread. Thank @careful-house-35186 for your contribute.
👍 1
❤️ 1
l
@bulky-kite-6813 let follow this thread
b
Hi everyone, Do you have any issue like that? I’m working on Macbook M1 and faced this issue. Thanks for your help! 0.0s
Copy code
Error response from daemon: create ././docker/deployment/default/env/cli: "././docker/deployment/default/env/cli" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
a
Please update to latest spryker/docker-sdk.
b
@average-branch-45579 you mean, I don’t need to change into apple-m1-adjustments branch? It should be use master instead?
a
Yes, master branch has arm support ootb already.
❤️ 1
f
While the latest docker sdk master branch does have ootb support, chances are things will not work with your project ootb. Be sure to check latest b2c demo shop for config differences in that case.
👍 1
❤️ 1
b
Thanks @average-branch-45579 @famous-address-39053 so much. I did it. The master branch is correct, we don’t need to change apple-m1-adjustments.