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

Terrarium image platform prevents running on OSX M1 #800

Open
skindc opened this issue Oct 6, 2024 · 4 comments
Open

Terrarium image platform prevents running on OSX M1 #800

skindc opened this issue Oct 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@skindc
Copy link

skindc commented Oct 6, 2024

What is the issue?

After installing pipx and poetry and seeting up the tavily account the command make first-run seemed to be running well.
Yet after downloading all of the docker images required and building those necessary the process got stuck attempting to complete the stack startup due to Terrarium's image not matching the host.

✔ Container cohere-toolkit-frontend-1                                                                                                                      Started                                                                      6.9s
 ✔ Container cohere-toolkit-test_db-1                                                                                                                       Started                                                                      6.9s
 ✔ Container cohere-toolkit-terrarium-1                                                                                                                     Started                                                                      6.9s
 ✔ Container cohere-toolkit-db-1                                                                                                                            Running                                                                      0.0s
 ✔ Container cohere-toolkit-redis-1                                                                                                                         Running                                                                      0.0s
 ✔ Container cohere-toolkit-backend-1                                                                                                                       Started                                                                      6.8s
 ! terrarium The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Is there a workaround for this?

Additional information

No response

@skindc skindc added the bug Something isn't working label Oct 6, 2024
@malexw
Copy link
Collaborator

malexw commented Oct 6, 2024

What tool are you using to run containers on your machine? Docker Desktop includes a virtualization layer that translates the x86 instructions to ARM, so while it's not ideal, everything should still work despite the warning. I'm also currently running on an M1 Mac and it's working for me.

@skindc
Copy link
Author

skindc commented Oct 7, 2024

Hi @malexw.
Thank you for your response.
First I would like to apologise for not disclosing the information about my Docker installation in my initial post, that was an oversight on my part.
I am also using Docker Desktop and I understand that this has a virtualisation layer as I have dealt with cross platform images a lot in the past with various deployments so this problem was unexpected.

Suspecting that the actual initial make command did complete successfully I attempted to run both make migrate and make dev.
make migrate seemed to complete. Yet as suspected, make dev failed for the same reason.

[+] Running 0/1
 ⠧ terrarium Pulling                                                                                                                                                                                                                     1.7s
image with reference ghcr.io/cohere-ai/terrarium:latest was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64
make[1]: *** [up] Error 18
make[1]: *** Waiting for unfinished jobs....

Considering that the message is suggesting that it could not find the correct image to pull, and not that docker could not run the image I added an explicit instruction to the docker compose file to pull the arm64 image expecting that then the Docker Desktop virtualisation layer would handle it.

...
terrarium:
    image: ghcr.io/cohere-ai/terrarium:latest
    platform: linux/amd64 //Added this
...

This seemed to worked as expected as I know see this:

✔ Container cohere-toolkit-test_db-1    Running                                                                                                                                                                                         0.0s
 ✔ Container cohere-toolkit-redis-1      Running                                                                                                                                                                                         0.0s
 ✔ Container cohere-toolkit-db-1         Running                                                                                                                                                                                         0.0s
 ✔ Container cohere-toolkit-terrarium-1  Started                                                                                                                                                                                         1.1s
 ✔ Container cohere-toolkit-backend-1    Started                                                                                                                                                                                         1.1s
 ✔ Container cohere-toolkit-frontend-1   Started

I will keep investigating my end why docker would not consider the amd64 image as a suitable image to pull if the arm64 image does not exist and why I had to be explicit in the Docker compose file.

Yet this maybe a helpful workaround if anyone else is experiencing the same problem.

If you have any input that may assist in why this may occur it would be very well recieved.

Thanks again.

@skindc
Copy link
Author

skindc commented Oct 7, 2024

Thanks @unfixa1. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@skindc @malexw and others