modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo
Other
22.07k stars 2.54k forks source link

Mojo cannot be installed in a Docker container because AUTH_KEY is deprecated #2265

Open phueac opened 2 months ago

phueac commented 2 months ago

Issue description

I am trying to install and use Mojo within a Docker container. Your blog post at https://www.modular.com/blog/how-to-setup-a-mojo-development-environment-with-docker-containers indicates this can be does by passing an AUTH_KEY into the container during build. But it looks like this authentication method was deprecated in a recent update to the Modular CLI?

It seems from your example at https://github.com/modularml/mojo/tree/main/examples/docker that an auth key is still expected to build a Docker image. I found by trial and error that supplying a made-up string of random characters as the key allowed the Docker build to succeed.

Perhaps you need to update the blog post and Docker example to reflect the deprecation of the AUTH_KEY method?

As a side note, it is kind of sketchy to require a login to your proprietary system before even being able to download and try out your tools. How are you going to convince Python developers who are used to a completely open ecosystem to adopt this?

Steps to reproduce

Version Info

- Provide Modular CLI version by pasting the output of `modular -v`
- What OS did you install modular CLI on ?
smuniraj2018 commented 2 months ago

Thanks, @phueac for your feedback. The recent client side changes in the auth flow change is a bug and we are working to fix this by the next release. I will forward you feedback on the remaining items to our internal teams.

JoshKarpel commented 2 months ago

+1, this also seems to be a blocker for installing mojo in CI systems (in my case, GitHub Actions) unless I'm missing something. I was looking to copy what pytest-mojo does since it seems to be a popular package https://github.com/guidorice/mojo-pytest/blob/ceac7afccc6c5fde6717155a64bcd02d781b17f4/.github/workflows/test.yml#L15 , but it depends on getting an API key, which no longer seems to be possible with the new auth mechanism.

byteshiva commented 1 month ago

I blogged about using Docker to run Mojo with auto-generated authentication keys. It's a quick fix for those who need to bypass authentication.

link: https://byteshiva.medium.com/elevating-your-workflow-dockerizing-mojo-for-seamless-development-628a0bc4b25b

josiahls commented 1 month ago

Also +1, I want to build nightly docker images for mojo nightly in github ci. If AUTH_KEY is deprecated I can't do this. I would really like to use mojo nightly and participate in contributing, however this can be a blocker.