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

Add Google Cloud Run instructions #2

Closed
wants to merge 1 commit into from

Conversation

cryptogohan
Copy link

Adds succinct instructions for how to deploy to Google Cloud Run.

This is v. quick and v. dirty. It is a dark forest, and there is prey to absorb.

Feel free to make liberal edits or reject the PR entirely.

Adds succinct instructions for how to deploy to Google Cloud Run.
@cryptogohan
Copy link
Author

cryptogohan commented May 23, 2021

Mmm, good to point out and maybe update in the instructions still, I'm running now with the same URL four times resulting in a silent MacBook but 5k hashes/s. However, Cloud Run by default allows 80 concurrent requests per container instance which of course is far from optimal here. I haven't yet done my own experimenting so no clue how to optimally configure when you're poor like me. If you've got ETH lying around, set concurrent requests low, up resources available per container, and have fun dominating 😄 .

Waddaya think? Maybe a small note on resource optimization, and perhaps the Dockerfile could live as a file, maybe you'd like a PR for a branch?

@jacobrosenthal
Copy link
Contributor

That might be a solution because it dodges the build timeout, but nobody has docker installed and people are going to need even more documentation on ui buttons to click if you can stand it. This branch has an example of the old instructions https://github.com/jacobrosenthal/mimc-fast/tree/v6-warp-split-gcloud

@cryptogohan
Copy link
Author

cryptogohan commented May 23, 2021

@jacobrosenthal we can add a cloud build! Timeout is no issue, Google Cloud Build allows for 24 hour timeout.

The difficulty is, if you're not familiar with Google Cloud Console, and set up a new project, there are a lot of buttons to click 😬 . Enabling APIs, connecting GitHub, connecting Cloud Build to Cloud Run. If making it more new-person friendly is the direction you'd like to go, I'd highly recommend building from this repo, and providing a public docker image that people can directly plug into Google Cloud Run or any other cloud provider that accepts a simple image URL to deploy (there are dozens).

@phated
Copy link
Contributor

phated commented May 23, 2021

@cryptogohan Yeah, that was my plan but I haven't had time to setup the github actions workflow to create them. Do you have any experience with that?

@cryptogohan
Copy link
Author

Yea sure. I'll try and find some extra time today to do so. Your game is awesome. I started finding artifacts that say weird things 👁️. Shame you don't have a token or something to reward contributions. Would love to contribute more to this but you seem to know what you're doing 😄 .

@cryptogohan
Copy link
Author

Done a bit faster than I expected 😅 , see #3 . After we merge that we can update this with far simpler instructions.

@cryptogohan
Copy link
Author

I just checked my Google Cloud because it's been running for a day now pulling about 3k hashes/second. $70 a month it looks like 😬 . Although ~$40 of that you get for free on Google Cloud Run. Would be good to add a warning for that too.

@0xjjpa
Copy link

0xjjpa commented May 31, 2021

@cryptogohan Have you taken a look at Cloudflare workers? They are also a serverless platform, not sure whether it might be cheaper though.

@cryptogohan
Copy link
Author

@jjperezaguinaga I have not 😄.

@cryptogohan
Copy link
Author

@jjperezaguinaga I took a look. Cloudflare workers only has a JavaScript runtime as of now. You'd have to rewrite mimc-fast to JavaScript first. If I'm not mistaken you can lift that from the Dark forest client. Which is doable albeit perhaps less efficient. Looking at the resource limits it doesn't look like a great option in any case. 10ms per request is far too low. Additionally, Cloud Run compute is dirt cheap. If you want to get cheaper than that I'm not sure you're going to find it without owning the CPU yourself.

@jacobrosenthal
Copy link
Contributor

I think this kind of documentation is generally moving over to https://dev-guides.zkga.me/ and I think submitting there would be my preferred solution. I would like to see a link to over there mentioning advanced configuration options though!

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants