AI Apps in a Flash: Ship to GPUs Without Docker — Dean Quiñanola, Runpod

summarized

TLDR

Runpod Flash is a serverless AI deployment platform that eliminates the Docker build-push-execute loop. The CLI provides live local testing and one-command deployment, with automatic dependency installation and caching. For ML engineers, this means 15-minute iteration cycles become near-instant.

Key points

Runpod Flash deploys AI applications to serverless GPU endpoints without requiring Docker.

The CLI supports live local testing with `flash dev` and production deployment with `flash deploy`.

Demo showed on-the-fly dependency installation and code changes without rebuilding containers.

Flash includes endpoint-to-endpoint communication and network volume attachments with warm caching.

A hackathon participant built a multi-endpoint experiment runner using Flash in under four hours.

Techniques

  • serverless deployment
  • live serverless testing
  • endpoint-to-endpoint communication
  • warm caching
  • CLI-based deployment
Transcript (captions)

0:12 Hello, good afternoon everyone. I'm uh Dean Kinyanola from Runpod Flash and um I want to talk to you about how you might be able to deploy AI applications without Docker.

0:26 So currently this is how you deploy a serverless application. Well, especially AI applications. You write code, you build your docker file, you run a bunch of

0:38 commands, docker build, all that. And then you push the image to docker hub. Then you execute it. Then maybe you'll get what you want. If not, you have to change your code again, rebuild it,

0:52 repush it, execute. Um, in my experience, sometimes this one loop takes about 15 minutes depending on the changes you're doing. So, my name is Dean Kinyanola. I am a staff engineer at

1:07 RunPod and I have an entire team that's working on making that easy. So, why did we build flash? development iteration loop requires a makeover. It's really a hassle. A lot of you guys are

1:22 software engineers or ML engineers who really don't want to deal with all the DevOps. So, as you're working on your ideas or as you're working on your experiments, you want the results. So,

1:33 no more need for Docker. Run code like it's local, as if you have the GPU. Uh test your changes instantly and debug quickly if you need to. So this is how we're thinking about

1:47 keeping it simple. You write your code, you execute, you get the results. Rewrite your code, execute, you get the results. Right? Of course, there's the deployment part. I'll talk about that

2:00 later. So it's so simple it feels like it's running locally. So what are the features that we have? So we are able to build and deploy

2:10 faster. We optimize the resource utilization. There's a lot of tricks happening under the hood and it's intuitive. It's just Python code. It's really whatever you can run locally with

2:20 a GPU, just do it on the cloud. So, what can you do with Flash today? We have serverless endpoints. It's mostly locked on serverless right now, but we're working towards doing it for pods.

2:32 Uh we have Q endpoints for it and load balance endpoints that you can use it for. Here's the uh really cool feature that I put in an endpoint to endpoint communication. Sometimes you're building

2:45 all these servers, but then you still have to know how to contact each server, right? You don't have to do that with this because it's just a code talking to another code. You execute a function and

2:57 it looks like it's just local, but once you deploy it in different endpoints, it's all talking to each other. It's all happening under the hood. We also have network volume attachments. Um we have

3:08 warm caching in network volume attachments so that if you ever have to scale up with your serverless endpoints then it has those cache carried over through the network volumes. And then

3:19 the most important part is the live serless. Uh you are coding and testing as if it's all happening in your local system. And then you know this would just be a toy project if you can't

3:31 deploy to production, right? So you want to deploy to production. So serve the inference, serve all the uh stuff that you're building. And we're making that possible all through the CLI.

3:42 So let's get a demo. Hopefully I can do this with one hand. Okay. All right. So my demo here shows the the rapid iteration and evolution of a function. So the first function is

3:58 just talking to torch getting what kind of GPU you have. So I'll do this live. I'll do flash dev. And what this does is it launches a fast API local host. So you can actually

4:15 toy around with it. So now you want to try it out. Let's try it out. Execute. So it's provisioning this serverless endpoint. And if we go to runpod

4:26 console, refresh this, you'll see this. This is running now. And as it's loading, let's let's show the logs. So you can actually see it.

4:44 All right. Workers ready. Yep. Oh, John. Cold start. This is common with all serverless platforms.

5:13 Oh, there it is. So, it's running. We got logs, container logs. So, it's testing all these things, making sure it's all healthy, and it ran the job. So, now if

5:24 we go back here, you'll see the result. It ran on an Nvidia GeForce RTX 4090. You see all the RAM, GPU count. Now, here's the kicker. What if I want to change this function

5:39 and just want to test it? So, here's a different iteration of this function. What we do is we add more code. And this code really just does generation of text. And I've added some

5:54 dependencies, the Python dependencies here. Oh, actually, let's do this without the hugging face token first. Let's see what's happening. See, it refreshed everything. I refreshed this.

6:07 Test it again. What prompt do we need? Uh, let's do string cheese. Is it real? Run it.

6:22 You see it again here. Container. Okay. It's coming up. You'll see all the the logs are simpler here because you're not supposed to be inundated with so much

6:40 stuff. But what it's doing is in on the fly installing the dependencies and it even gave me a warning about communicating with the hugging face server without the token and it should

6:54 be finished. Okay, now it's finished. Let's see the result. I ask is string cheese real? I'm sorry but I cannot provide answers. All right, that's that's spicy.

7:08 All right, let's let's change that up. Let's enable my HF token. That's just changing the code right now. We release this again. Let's change the uh prompt.

7:25 Let's see who is Batman. Let's execute that. Ready? And let's see how's this working here.

7:41 It's cool. I'm doing this with one hand. >> All right, let's finish. Now we see the result. Oh, there. There you go. Batman's a fictional character. All right, we knew that. Let's go for

7:55 something that's more intensive than just generating text. Now, we'll do an image generation. All right, it refreshed. Let's refresh

8:10 this local host. Now you see generate image and then we'll test this out with a prompt. Let's create an image of a string cheese

8:26 Batman. All right, this is how creative AI could be. Let's look at what's happening here. Running

8:42 logs. Oh, look at that. Roll out in progress. Okay. I got plenty of time. That's not it. All right. I just had to

9:10 terminate that because it was running the the older version. All right. Now it's new. I didn't want to wait for that roll out. I just want to see string cheese Batman.

9:23 All right. So, it's it responded with a base 64. Okay. Let me clean that up before I show that. So

9:37 how you can render this is through the browser. All right, let's see what string cheese Batman looks like. That's not string cheese, but that

9:56 proves it right. It did it. Now, what if you want to deploy this? So, check this out. When I cancel it, it actually deprovisioned that endpoint. So, you don't have to have that lying around.

10:09 See, it's gone now. Now, what if we want to deploy this? So, let's deploy that. Flash deploy. That packages up the whole thing, builds it up, sends it to our servers.

10:27 Again, no Docker. You're not dealing with Docker here. This is instantaneous packaging of your application, sending it out to our servers, and serving it. Now, here's the cool part. Once it's out

10:40 there, I have prepared this prompt, but I just need to change this ID later because this is going to matter. All right. So, it's created the archive

10:54 built flash. All right. Sending it out. Uploaded. Deploying. Now it's up. All right. Let's see the ID here. Okay. Now, let's get this

11:11 going. So, my prompt is a cute baby sea otter with a bow tie. Generate that image. Oh, yeah. I want to show you where this

11:23 is. Now this is fully servable, right? Like you can have your customers, you know, use your application that uses this back end. It no longer lives in my local host. This is being hosted.

11:37 All right, let's see workers log. Okay, when it's done, it should print the output here. There we go. All

11:53 right, let me wrap this so I could pull this up. This is crazy doing it in one hand. All right, let's load up the picture of a sea otter with a bow tie.

12:10 There's no bow tie. But that's not the point. We All right. So, you get that. That's the demo. We had a hackathon yesterday and I just wanted to be to present this to I'm very

12:25 proud of this guy uh Funka. He created a wrapper around our flash that enables you to upload a data sheet of all your experiments of some specifications of some models and run it instantly and it

12:40 just fans out builds out all these endpoints runs your training and then reports back to you. And he did this within three to four hours. And he had no idea

12:53 how to do runpod flash. He had to ask me questions if this was even possible. I'm like, let's see. And he was very surprised when he won yesterday because his his project was not even his best

13:07 one apparently and he keeps losing to other hackathons. So just really proud of this guy. How do you get started with runpad flash? So, well, you sign up for an

13:16 account on RunPod, scan that QR code, get some $10 uh credit now, and all you really have to do is just install it, write your code, log in to have your uh API key in there, initialize, it'll have

13:31 some skeleton application if you want, flash, the local dev that you have, or flash deploy to production. And we have all these URLs. The best advice I have is visit the runbot flash examples on

13:44 GitHub because we have all these cases and examples that you could kind of refer or if you like AI coding just run cloud code into that repository and it will learn everything.

13:58 We also have skills if you're into that. And that is my presentation.

Frontier News · by Hyperjump Technology