Time Sketch 3: Hooking up Docker for Weather Journals

schuyler
2 min readOct 20, 2020

--

Well… This is not very exciting, but it’s a necessary part of how my project works and it’s what I’ve been working on for the past week, so… Introducing Docker!

So basically, Docker is a tool for shipping your applications out of your computer and running them wherever. It does that by putting your applications in “containers”, which have their own infrastructure and can be run independently of your actual machine. Now, I do not know Docker super well, so I won’t embarrass myself by getting into more detail than that, but that’s how it works.

So, what’s this got to do with weather journals? Well, here’s the thing: I can’t have an ML algorithm up and running on my computer all the time, waiting for people to send calls to it. I’ve got to have it running somewhere all the time. And for that, Google Cloud Run is what I was recommended to use. If you host your applications on the cloud, you get a handy URL you can send AJAX requests to and get responses from.

But, in order to run apps on the Google Cloud, you’ve got to package them in Docker.

I’m a windows user, and this used to be an absolutely AWFUL affair because there wasn’t a Docker version that ran natively on Windows. However, much to my pleasure, they’ve recently come out with Docker Desktop, which actually provides a pretty nice GUI for users working with Docker.

The biggest part of getting Docker was actually getting it to link to my Google account and having the right credentials. They put a lot of security on this stuff, but I guess I’m not surprised.

Little sneak peak of my google cloud run account for this one — if you go to the URL you’ll get a story, ha

After everything’s on GCR we can just call the URL you see up there and get back a beautiful little JSON snippet of a story! Then it’s just about plugging it into our webpage. : )

Anyways, that’s about the whole process. I guess I learned some new things here, huh?

--

--