How I Learned to Stop Worrying and Love the Sandbox — Matt Brockman, E2B
AI Engineer · 59 min · 952 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:24Hey y'all.
- 00:26Okay, cool.
- 00:26All right.
- 00:27So, I see people still trickling in, but uh we're going to go ahead and get started.
- 00:31Uh so, nice to meet y'all.
- 00:32Uh I'm Matt.
- 00:33I'm an engineer from E2B.
- 00:35We do sandboxes.
- 00:36[sighs]
- 00:36Uh so, before we get started, uh how you all doing this morning?
- 00:41All right.
- 00:41So, my hearing is like really messed up.
- 00:43Uh I couldn't hear that.
- 00:44So, how are we doing this morning?
- 00:46All right.
- 00:46Great.
- 00:47All right.
- 00:47So, everyone's live.
- 00:49Uh and uh also, where are we all from?
- 00:51So, how many people here are from San Francisco?
- 00:53Uh based out of San Francisco.
- 00:55Okay, we got a couple uh coming out of state.
- 00:58All right, a lot of people coming from out of state.
- 01:00Great.
- 01:01Uh also uh we're going to be uh talking sandboxes and then doing uh basically a capture the flag.
- 01:06Uh I don't know if you all have done a capture the flag before, but uh what it's going to be is it's a series of different levels that we're going to go through uh solve it and that unlocks the next level.
- 01:14Um uh as far as programming languages that we use, uh how many people here use Python?
- 01:20Okay, most of us use Python.
- 01:22Good.
- 01:22Uh so our SDKs in both Python and JavaScript.
- 01:25Uh good news also is that we don't need to code at all for the first couple levels.
- 01:28A lot of these are going to be configs kind of looking at how sandboxes work.
- 01:31Uh JavaScript.
- 01:34Okay.
- 01:35Uh Go, where's my Go engineers?
- 01:37Great.
- 01:38We are hiring by the way uh for people that uh uh code in Go uh for the back end.
- 01:42Uh so uh come check out our page after this or during this.
- 01:46Um let's see.
- 01:47And then how many people here don't code at all?
- 01:51All right, great.
- 01:52All right, so let's get started.
- 01:54Uh, oops.
- 01:57So, all right.
- 01:57I don't know if people can go to this link, but if you go to this uh tinyurl.com, y'all can see that if you go there, uh, that'll give you a sandbox.
- 02:07Uh, so you have to log into E2B.
- 02:09Um, but what this workshop is is everything is basically sandboxes all the way down.
- 02:14Uh so what we put together for you is uh a bunch of different challenges that are issues that you run into running a uh sandbox.
- 02:20Um we'll worry about visiting in a second.
- 02:24Uh and then also you can just do the QR code.
- 02:26Uh everyone able to get to that page?
- 02:29Thumbs up, thumbs down.
- 02:31Cool.
- 02:32All right.
- 02:33Uh and if you can't, don't worry about it.
- 02:34We'll be walking through it.
- 02:36So at this point, feel free to uh start going through the instructions, figuring out how to hack away.
- 02:40Uh or if you actually want to listen to me drone on about sandboxes, you can do that instead and then go uh uh do the sandbox uh start the CTF uh with every with me.
- 02:51Okay, so just a little bit about EDB.
- 02:54Uh so what are sandboxes?
- 02:56Uh sandboxes are uh basically let you run user specific code uh without messing with other users, right?
- 03:02So a lot of the time uh with a traditional web stack, it would be like, hey, here's a web page.
- 03:06It's a static web page.
- 03:07You can go do stuff.
- 03:08uh you know maybe had users that could code and what they wanted to be able to do is use something like collab uh where you go in there and you can you know play around uh you might want to have like AWS EC2
- 03:18right get into that run your code uh what we're seeing with a lot of the modern stuff with agents is you know you've got this magical being in the cloud that can do all sorts of really cool tasks
- 03:28and one of those tasks is coding um now there's a couple ways you can do that one thing is you can just run things locally on your own computer right who here's used like codeex
- 03:37cloud code, right?
- 03:39Uh so you can be like, hey, you have all the permissions you want to do.
- 03:42Uh and it can go run around and then delete things, create things, whatever.
- 03:45Uh some of the problems that you run into are, you know, it'll use up all your CPU.
- 03:49It'll spawn a bunch of processes.
- 03:50It'll delete things it's not supposed to.
- 03:52Maybe able to start accessing environmental variables.
- 03:54Uh there's a lot of things that are dangerous about that.
- 03:56Um so that's where it's okay, hey, let's put it in the server.
- 03:59Well, on the server, you have similar problems.
- 04:01you've got secrets, you've got uh your environment is you need to make sure that everything that you want it to be able to interact with uh is present.
- 04:07Uh and that's where sandboxes come in.
- 04:10Uh also uh with uh one thing that's a little bit different uh the way that we view sandboxes and other things is that sandboxes you want to be able to very quickly spin these up.
- 04:18Uh EDB we sp we aim to uh spin up sandboxes in less than 100 milliseconds.
- 04:23Uh so that way you can run multiple things at the same time.
- 04:27Uh so yes uh also so with our sandboxes uh there's a couple things that we uh try to do.
- 04:33So it's uh when you go into a sandbox uh you're working and uh like when you close your laptop you open your laptop again you're back into your state.
- 04:41Uh for us it's uh same thing.
- 04:43So we try to uh snapshot the memory, snapshot the file system.
- 04:46So that way uh whenever you stop working you pause everything, save everything to storage somewhere and then resume it.
- 04:53Uh agents especially, right?
- 04:55So you've got an agent working away.
- 04:56Uh maybe it has to go do some sort of process elsewhere.
- 04:59Uh and then it wants to come back uh to the state it was in.
- 05:02Uh for the agent, it kind of doesn't know the time has passed and so it's expecting everything to be exactly the way it was when it uh left off.
- 05:08Uh and so by snapshotting everything and making it so everything is still there when it comes back uh makes it so you get less errors.
- 05:15Um so yeah the way our approach to these sandboxes is basically we start the processes first uh and then we as I just said before we're uh saving the disk in RAM
- 05:25uh and we're resuming sandboxes from that state uh so that's a little bit different like if you think about docker when you start a docker image uh you have kind of you build up a bunch of things
- 05:36uh and then when the process starts uh that's where you have your start command uh for E2B basing from everything already running.
- 05:45Uh so for instance you uh when we have our templates uh which we'll talk about in a bit uh what you're doing is uh you start processes and then those processes are already running when you come back to the sandbox.
- 05:57All right.
- 05:58Uh we're also open source uh and so for infra uh you can see our links there.
- 06:03You can also Google uh that we've got our back end's mostly in Go uh which is why I asked about the Go engineers.
- 06:08We're desperately hiring.
- 06:09Uh and then also our SDK is in Python and JavaScript.
- 06:12uh working on extending that to other languages, but that covers quite a few of our use cases.
- 06:19All right.
- 06:20So, normal usage of sandboxes are uh we have an API key.
- 06:23You go to edb.dev uh and then you can also go read our docs.
- 06:27However, for this workshop, uh we're not going to need to worry about any of that because we're just going to do everything inside of our own sandboxes.
- 06:33Uh we're going to spawn the sandboxes through our dashboard.
- 06:35Uh that way we can hopefully get uh up and running very quickly.
- 06:39uh and uh that should eliminate some of the issues that we've heard happen in workshops.
- 06:44So, all right.
- 06:45And again, uh I guess we found out most of us already know Python.
- 06:48Uh which is good.
- 06:49Uh but for this workshop, we're not going to need to code uh for the first several levels.
- 06:53Uh once we get past, I think level seven, that's when uh we start needing to code in Python or JavaScript if you want to.
- 06:59Uh and we'll have tests that make things uh fast.
- 07:02Uh we would have liked it.
- 07:03Uh one of the challenges that we uh had when coming up with hey how do we demo uh some of the issues that we run into sandboxes is uh a lot of issues happen at scale.
- 07:11Uh so sometimes when you're managing just like one or two sandboxes it's pretty easy.
- 07:15It's just like hey I've got one sandbox I go into it pause it resume it no issues.
- 07:20Uh however uh once you start to deal with hundreds of sandboxes, thousands of sandboxes uh things start to take on a life of their own.
- 07:27uh for that we have some uh basically simulations uh in in the uh workshop uh which hopefully are fun.
- 07:34Uh also uh even I know it's 2026 and we have agents uh so most of us don't actually code by hand anymore or many of us don't code by hand anymore.
- 07:43Uh you so most of the uh AI agents uh know the ED SDK and so what you'll be able to do is uh grab your sandbox ID that you get for each of the levels, give it to your agent and uh let the agent just figure out how to write the code for you.
- 07:56Um, but this is for learning purposes.
- 07:58So, if you want to do it by hand, it's probably better.
- 08:01All right.
- 08:01Also, uh, I'm supposed to point this out.
- 08:04Uh, if you're at a startup, we have a startup program, uh, where, uh, we give, uh, credits and, uh, free plan.
- 08:11All right.
- 08:12So, let's get to the first level.
- 08:14So, let's go back to Let's see.
- 08:16I don't know if there's a way to keep this up, but was everyone able to get to this, uh, URL here?
- 08:23Yep.
- 08:23Cool.
- 08:24All right.
- 08:24So, let's go there.
- 08:25I already have it open, but that's fine.
- 08:29Okay.
- 08:32So, it is uh this tinyurl.comwh46sx6.
- 08:40Uh I don't know if there's an easy way to keep this up on the screen while we're going, but uh all of you have neighbors and so you can just go to your neighbor and be like, "Hey, what's what's that code again if if you need it again?"
- 08:51Uh so, I'll give you another five seconds.
- 08:53Can I just get a thumbs up as people have gotten there?
- 08:57Okay, it looks like those guys over there are good.
- 08:59Over here generally good.
- 09:02All right, cool.
- 09:05All right, so what we're inside of here is already a sandbox.
- 09:08All right, so at the top, what we're going to have is uh so this is uh our uh web UI for viewing our sandboxes.
- 09:16Um and again, as I said, we don't need to code yet.
- 09:18Uh and so this is our dashboard.
- 09:20uh inside of the dashboard, if you want to uh make an API key, you can uh you can go into your API keys here uh and uh create an API key, which you can then uh hook into this locally.
- 09:30However, we've got this gorgeous UI uh that's going to tell us what to do.
- 09:34Uh so inside of the sandbox, what we're doing is we're spawning a web server, and we're just going to go up here, right?
- 09:40So, we can go there now.
- 09:41Uh and so here is our uh lab.
- 09:43All right.
- 09:44So, uh our first task is very simple.
- 09:47Uh it's basically can you find out the sandbox ID that you're inside of?
- 09:50Uh now we have a bunch of instructions for how to get that from the sandbox itself.
- 09:53Uh I'm going to show you a cheat code.
- 09:55Uh now in the URL we actually have the uh ID of the sandbox.
- 09:59Uh and so we can just copy that uh ID.
- 10:01Uh again our first levels are mostly just to make sure that everyone's oriented and they can get the different pieces working.
- 10:07Uh and you can just paste it here, right?
- 10:09We check it and uh so we should be good.
- 10:12Everyone So has everyone been able to get past the first level?
- 10:17Okay.
- 10:18Getting the ID is hard.
- 10:24Do Well, everyone's going to have different sandbox IDs.
- 10:30Oh, that is our helper, one of our uh
- 10:32[laughter]
- 10:34uh go to market people from E2B back there.
- 10:36Uh uh just if you want to come up here.
- 10:38Huh?
- 10:39Sorry.
- 10:40The Wi-Fi is not working.
- 10:41The Wi-Fi is not working.
- 10:42All right.
- 10:42Anyone else having Wi-Fi issues?
- 10:45I guess.
- 10:46Great.
- 10:47All right.
- 10:47Uh, so one of the Okay, so I tested this before I came in.
- 10:50Uh, so the Wi-Fi that we're supposed to be using is it was like AI engineer something.
- 10:57Here we go.
- 10:58It's on these things.
- 10:59Uh, a engineer uh, Wi-Fi.
- 11:01If you connect, you'll have one bar possibly.
- 11:03What you do is you dis after you've connected, disconnect and reconnect, and it should give you five bars.
- 11:09Okay.
- 11:10I don't know why that worked.
- 11:14Sorry.
- 11:17You got here already or no?
- 11:24Gotcha.
- 11:24Okay.
- 11:25So, all right.
- 11:28All right.
- 11:28So, set up.
- 11:30So, okay.
- 11:31At this tiny URL, this should give everyone a terminal, right?
- 11:35You'll have to log into E2B.
- 11:36Make the font bigger.
- 11:38Oh, make the font bigger.
- 11:46URL.
- 11:50I'm just going to keep zooming in.
- 11:55Okay.
- 11:56URL.
- 11:57Everyone had already gotten there.
- 12:01Go back.
- 12:02Okay.
- 12:02We can give you the URL one more time.
- 12:04Uh after this we have to start charging because uh screen time's expensive.
- 12:11All right.
- 12:13Got about 10 more seconds to try to get to this URL, but uh I I can also say it out loud.
- 12:17This is uh tinyurl.com4 whiskey hotel for 6 Sierra X-ray 6. Okay.
- 12:32And that should bring us to a terminal.
- 12:36You need to sign up.
- 12:37Yes, you do need to sign up for EDB to use this.
- 12:46Huh.
- 12:47Also, beautiful ASI art does not look as good on the big screen as it does on a smaller screen.
- 12:54Cool.
- 12:54Uh, can I get a show of hands?
- 12:55Who was able to get to this page?
- 12:58Okay, who was not able to get to this page?
- 13:01All right, we don't want to leave you guys behind.
- 13:03We're going to make sure that we get the first setup part, but uh for those of you that were able to get to this page, you're good to go ahead and keep going through levels if you're able to.
- 13:17All right, I'm going to give another Let's see.
- 13:29Okay.
- 13:31Yeah.
- 13:31Yeah, it's everything's running remotely in the sandbox, so hopefully we don't need much back and forth.
- 13:37Uh, famous last words.
- 13:44All right.
- 13:45Uh, can I get So, for people that were still loading, uh, who's still waiting to try to get to the page?
- 13:50One, two.
- 13:51Uh, uh, Ally, are you able to help these guys out?
- 13:56Uh so we've got our uh helpers that can come through and uh help debug what's going on.
- 14:02Uh what's the main issue we still have?
- 14:04It's just the internet connectivity.
- 14:07Okay.
- 14:08And then worst case, uh everyone here's friendly, right?
- 14:12Uh what we can do is we can partner up.
- 14:14Uh and so uh let's see.
- 14:17Uh can I get that show of hands?
- 14:18And who's still trying to get to the page?
- 14:20One, two, three.
- 14:21Okay.
- 14:21Can I get a show of hands of uh people that are friendly and don't mind sitting next to somebody?
- 14:26All right.
- 14:27So, if you're still waiting, look around for someone that's got their hand raised.
- 14:29Uh, and it can uh kind of pair up.
- 14:33All right.
- 14:34So, once we're here, All right.
- 14:36Yeah.
- 14:36Sorry, it's uh we've got limited time and we want to keep moving.
- 14:39Uh but, uh yeah.
- 14:41All right.
- 14:42So, once we're here, uh we should have this URL now uh that our first sandbox is going to spawn for us.
- 14:47And then we can just go straight to that.
- 14:49All right.
- 14:49And so, everyone should get to a page that looks something like this.
- 14:52Uh that's going to have uh our CTF instructions.
- 14:56Cool.
- 14:58Show hands.
- 14:59Yeah.
- 14:59Also, you guys didn't know this, but this is like an interactive uh workshop, right?
- 15:04Where it's Raise your hand, lower your hand, raise your hand.
- 15:06Uh Simon says is next.
- 15:08Um but yeah, so who got here?
- 15:11Show hands.
- 15:13Great.
- 15:14All right.
- 15:15And then so who was able to find out their sandbox ID?
- 15:19All right.
- 15:19Cool.
- 15:20Who was not able to find out the sandbox ID, but is still here?
- 15:23who is too embarrassed to say that they couldn't find their sandbox ID.
- 15:26Uh, okay.
- 15:28And again, so we can just pull the sandbox ID out of the URL.
- 15:31Uh, this ID basically is is identifier for the sandbox, right?
- 15:35So once you have a sandbox, you're going to want an identifier so that you can go back to that sandbox uh for E2B, the way that we construct our URLs
- 15:42uh is basically the port that you're talking to dash uh the sandbox ID uh.app.
- 15:48And that way whenever you spin up sandbox, you can expose services listening to those ports.
- 15:53uh and and then uh get coms open.
- 15:56So we'll uh refinish this uh first level.
- 16:02All right.
- 16:03So one of the things that happens uh uh is once you've got users in a sandbox, you've got AI writing code.
- 16:09Uh a lot of the times what'll happen is the AI will write some something that does something that you're not expecting it to do.
- 16:14Uh it turned out while writing uh this workshop, we ran into this issue a lot that we had processes that just took lots of CPU.
- 16:20So, what we can do is we can start this sandbox and you'll see up here, right?
- 16:24We are now inside of a new uh sandbox, right?
- 16:26So, our new we got a new sandbox specifically for this uh project, which means we can break this and we're not going to break our initial stuff.
- 16:34Uh if we want to restart a sandbox, we've got this uh fancy button over here to reload, right?
- 16:39And then it'll reload it.
- 16:41Yes.
- 16:41Uh while we're here, I should kind of point out some of the things that are happening uh that we don't need to worry about too much, but more just kind of framework on how uh we just manage our dashboard.
- 16:50Uh we've got this terminal here that lets us uh connect a pty uh session to a sandbox.
- 16:55Uh and so uh we have this concept of templates which I mentioned earlier.
- 17:00So a template uh for us is that snapshotted uh VM.
- 17:04And so what we've done is we started a VM, ran a bunch of processes to start the capture the flag uh and then we saved this as this template which means all of you uh are basically taking that sandbox that I'd started before
- 17:16uh and then you're starting it where I'd resumed it.
- 17:18Right?
- 17:18So we just made I don't know 200 copies of this thing uh which is pretty cool uh just but that we can do that by itself.
- 17:24Uh there's a lot of use cases for this kind of thing depending on what you're doing at your business uh that you'll want to be like hey I've got uh this work I want other people to continue it.
- 17:32Um and or even like if you're doing data science stuff, right?
- 17:36So let's say you've got a bunch of uh data in a data frame.
- 17:39You're like, "Hey, I want to try mutating this.
- 17:41There's like five different experiments I want to run."
- 17:43You can take that, fork that into five different things.
- 17:45Uh and then in parallel uh spin that up into five different sandboxes.
- 17:50So uh this up here is just the template ID that we're spawning.
- 17:53Uh and then now that we have the sandbox ID, uh when we re reload this, we'll go back to the same page over and over again.
- 17:58Um and we can connect to that.
- 18:00Uh one thing also is so let's say that uh uh I mentioned later on we're going to have some code uh for those of us that are jumping ahead.
- 18:08You can take the sandbox ID you can create an EDB uh API key uh and then in your local uh you know codeex cloud code whatever uh you can be like hey stuck these in environmental
- 18:17uh file use EDB to go talk to the sandbox and solve the challenge for me.
- 18:21Um, and that can make life easier.
- 18:23So that way you don't have to code because again, uh, most of us are just letting the AI code for us nowadays or in some way.
- 18:28Uh, don't just let it code for you.
- 18:31Uh, you should always review what the AI does.
- 18:33Um, do what I say, not what I do.
- 18:36Uh, so, right.
- 18:37So, each of these, uh, challenges is going to have, uh, just like the first one, we can just stick this up here.
- 18:43All right.
- 18:44And so, here's our CPU uh, runway task.
- 18:46Uh for those of us that haven't coded a lot, haven't messed around with Linux recently, uh we've got instructions on how to uh figure out what's going on.
- 18:52Right?
- 18:52So we can see here uh we've got another terminal.
- 18:55We're sandboxes and terminals all the way down.
- 18:57Uh this is opening another pty into the local uh sandbox.
- 19:01Uh and so basically uh our instructions here, hey, we've got a CPU uh we've got some processes taking a bunch of CPU uh for these early levels.
- 19:09We've got instructions uh how to find uh what's taking up CPU, right?
- 19:14All right.
- 19:14And so we can list here, hey, what's going on?
- 19:16And we have this uh process up here uh that's been running for a bit, taking up 99.7% of our CPU that we probably uh should kill.
- 19:26Well, how do we kill uh a process?
- 19:29I forgot how.
- 19:30Uh but luckily, we have instructions here for how to do it.
- 19:33Or could also ask our friendly AI, right?
- 19:35So, what we're going to do is we're going to go ahead and kill that process.
- 19:38Uh right, so we got the process ID up here, right?
- 19:40Right.
- 19:40So, this is showing our process uh how much CPU each of these guys is taking uh memory uh so forth.
- 19:46Uh and so we're going to go kill 250 uh 1250.
- 19:49Right.
- 19:50Now that he's dead, we have now identified, hey, we have solved our runway process.
- 19:54We copied this amazing code here.
- 19:57Go back to our uh initial capture the flag.
- 20:00And we've unlocked level three.
- 20:02All right, everyone able to do that, right?
- 20:06Cool.
- 20:07Anyone stuck?
- 20:10I don't want to embarrass their stock.
- 20:12No. Cool.
- 20:16All right.
- 20:16Then we can open up our next level.
- 20:22Okay.
- 20:22And again, same thing, right?
- 20:23So we get a new sandbox.
- 20:28We can open this up.
- 20:30Right.
- 20:30And so this is another thing that happens a lot, right?
- 20:32You've got an agent running code in a sandbox.
- 20:34You've got you're running code in a sandbox.
- 20:36Uh you're blowing up memory, right?
- 20:37So, one of the things about these sandboxes is uh you've got some trade-offs in the amount of resources that you're using.
- 20:44Uh a lot of the times you're going to want to have I don't know uh let's say uh you know there's a trade-off between if you have multiple CPUs, you're going to run faster,
- 20:55fewer CPUs, it's going to go slower.
- 20:57Also, in terms of resource utilization, uh one of the things that you start to run into uh with fleets is uh you have limited quotas on how many uh CPUs and how much RAM you're able to have for your instances.
- 21:06Uh so there's trade-offs uh on can you just overuse it?
- 21:09So you're going to want to be like hey how do I minimize uh my RAM utilization.
- 21:14So again uh in this walkthrough we can easily go through here and then we can go into our sandbox show what's using up our memory uh right and then we can kill it
- 21:30right same thing.
- 21:31So for the first couple levels, all these instructions are here.
- 21:35Uh 124 1248.
- 21:40Bam.
- 21:41And then we get our key.
- 21:44Okay.
- 21:44Am I going too slow?
- 21:45Too fast.
- 21:47Right speed.
- 21:50Good.
- 21:50Right speed.
- 21:51Okay.
- 21:57Cool.
- 21:59All right.
- 22:00And then so finally it's uh hey what happens once we start filling our disk right so all these things have limited resources uh and all these things you're going to run into at some point or another things are going to blow this up
- 22:11so same process um right you can see we're in a new sandbox we can ls around right we can see hey we've got our instructions in here we've also got a read me if uh you want to
- 22:21uh see more info on here right so we can c the read me Okay, then.
- 22:30So, uh, yeah.
- 22:33All right.
- 22:35Uh, so let's go to here.
- 22:41So, here we've, uh, filled our disk, right?
- 22:43So, same thing.
- 22:44Uh, we can check, hey, what's going on as far as what's taking up our, uh, our disc.
- 22:57All right.
- 22:57All right.
- 22:58And then we just got to figure out, hey, what is the path uh in here that's taking up all of our uh this, right?
- 23:13Actually, this used to have all of our instructions in here, but right, we can see in here.
- 23:18Uh let's remove this guy.
- 23:24Okay.
- 23:25And again now I should say that we've succeeded.
- 23:38We also have a Oh, we were supposed to put it here.
- 23:47Just kidding.
- 23:51All right.
- 24:14So, the easy levels apparently were not as simple.
- 24:19So in theory, well, what we can do is we can actually just reload this uh s I broke the demo.
- 24:27That's okay.
- 24:28We can just start a new one.
- 24:31Let's try again.
- 24:35And let's pretend I didn't break that.
- 24:42Okay.
- 24:51Okay, we should have just been able to delete it.
- 24:56But let's do it here then.
- 25:06Okay, there we go.
- 25:08So, okay.
- 25:12All right.
- 25:12All right.
- 25:12And then so we were then we get the uh we were supposed to paste the uh path in there instead of remove it.
- 25:18I guess I broke that.
- 25:20Um and so everyone able to get to this uh flag or cool.
- 25:25All right.
- 25:25Great.
- 25:27Anyone not able to get to this flag?
- 25:30Okay.
- 25:31So uh real quick for how I solve that one.
- 25:35Uh what you do is so uh on the disk fill uh challenge what we're looking for is uh which uh what is taking up all of our file uh
- 25:47space.
- 25:48Uh and so what we need to do is we need to find uh up here in the hints uh you can copy the uh the uh script uh to find where
- 25:56uh what's taking up all of our uh disk space.
- 25:59And then here we should be able to see that we have this slashtemp selfone discill.bin.
- 26:04Um and then what we can do is just paste it uh down here into the path uh checker.
- 26:12All right.
- 26:13And then click uh here to clean it up.
- 26:15And that'll run the delete command for us.
- 26:18And then uh we should get this uh task uh complete flag.
- 26:22Everyone got there?
- 26:25So
- 26:25I don't get this.
- 26:27You don't get this.
- 26:30path.
- 26:31Disk fill path.
- 26:36Okay, one second.
- 26:36So, you've gotten to uh disf level level four.
- 26:42Cool.
- 26:45Third time's the charm.
- 26:47All right.
- 26:48So, we can open uh the page for the challenge.
- 26:54Uh and then so what we want to do is so up here we have uh some code that we can run in order to find uh what the uh
- 27:02what what files uh are taking up the most disk.
- 27:04Okay.
- 27:06So are we able to get to here so far?
- 27:09Cool.
- 27:11Right.
- 27:12Then uh when we run this uh dua uh we should be able to find the temp file the file in temp uh this uh disk fill.bin uh that's taking up 512 megs of uh disk space.
- 27:31You don't have that.
- 27:33What do you have?
- 27:38Sorry.
- 27:41There's nothing inside of there.
- 27:42All right.
- 27:43So, what we can do, right, and that's where uh the great thing about sandboxes, you can restart them.
- 27:48Uh right.
- 27:48So, if you go back into here, when you uh click on the start sandbox, uh we can reload the snapshot by clicking on this reload button up here, right?
- 27:57And so, this will spawn us a new copy of it.
- 28:09Okay, everyone else good?
- 28:12Yep.
- 28:14Yeah, exactly.
- 28:14So, it's this button here.
- 28:16Refreshes it.
- 28:17And then you can see here it's saying hey uh start here open this browser page uh for this uh set of uh tutorials.
- 28:24Um it'll say we've returned uh if it's the same one
- 28:28and that resets like original
- 28:30exactly.
- 28:32Yep.
- 28:32And so that's where uh yeah it's it's you can see like our start time is pretty fast right clicking here able to create a sandbox and relatively quickly.
- 28:44Uh and so it's we can create as many sandboxes as we want to create.
- 28:50Question.
- 28:50Yeah.
- 28:51You don't have any funny characters that have some supporting agent go and scrape this or things like that.
- 28:58We won't have any issues.
- 28:59Nope.
- 29:00Yeah.
- 29:00I mean, yeah.
- 29:01Uh this is just a terminal showing the sandbox.
- 29:03Most of the time when people interact with this, it's all programmatic.
- 29:05So you have a web server that's going in programmatically and running code in the sandbox purely for demonstration purposes.
- 29:10Uh, and also for debugging purposes, uh, being able to quickly go into the browser and pull up a sandbox can be useful.
- 29:17Um, and also here it's kind of we're able to spin up a web page really quickly to get in and see what's going on.
- 29:24Yes.
- 29:24Yes.
- 29:25Yes.
- 29:26And that's what I was saying.
- 29:27So, uh, yeah.
- 29:30Um, we'll come to that in a couple levels where we actually start uh interacting uh programmatically with uh these sandboxes.
- 29:36But mostly it's right now we just want to make sure everyone's on the same page for what is CPU, what is RAM, uh what's going to blow up uh when we're starting to run a whole bunch of different
- 29:44uh things that we're getting arbitrary code execution run on.
- 29:48Cool.
- 29:49Everyone good now?
- 29:52Awesome.
- 29:53All right.
- 29:55Um one thing I didn't do was get the code for that level.
- 29:59I'm just going to go uh restart him real quick.
- 30:08I'm just clicking around on buttons.
- 30:20Let me find our pro our uh file that's taking up all of our disk.
- 30:25this guy here.
- 30:30And then we can check our path.
- 30:32Okay.
- 30:33And we'll click on clean up.
- 30:37Great.
- 30:39All right.
- 30:39And so that's the end of our easy uh easy tasks.
- 30:45All right.
- 30:45How's everyone feeling?
- 30:46We we know all about how to mess around with Linux now.
- 30:48Feel comfortable?
- 30:49Yes.
- 30:49No. Great.
- 30:50Uh let's stand up for like a minute real quick.
- 30:53Uh get the blood flowing.
- 30:54uh kind of stretch out.
- 30:58Okay.
- 30:58We're also a calisthenics uh company.
- 31:05Okay.
- 31:08Cool.
- 31:11All right.
- 31:12So, that was hey, this is what Linux is.
- 31:15Uh our next set of uh uh tutorials are going to get us into actually looking at the sandbox life cycle.
- 31:20Uh so with a normal server, you spin up the server and it lasts there until you're like, "Hey, I want to shut it down."
- 31:25Or Amazon is like, "You haven't paid your bill in a while.
- 31:27We're shutting it down for you."
- 31:29Uh or actually, if they're doing anyway, TLDDR, uh for sandboxes, a lot of what you're doing is looking around the life cycle of the sandbox.
- 31:38Uh there's multiple things that we need to care about here.
- 31:41So one is let's say you've got thousands of users or tens of thousands of users.
- 31:44You're like, I want to give every single one of these guys a sandbox when they come to my application.
- 31:48Well, how long should that sandbox last?
- 31:50Right?
- 31:50A lot, you know, intuitively it's like, hey, I'll give them the sandbox.
- 31:53They land on my web page.
- 31:54I'll give them the sandbox for 20 minutes.
- 31:55If they don't use it, I'll shut it down.
- 31:57But if you got thousands of users and they're only going to use it once or maybe not even interact interact with the sandbox, you're wasting a whole lot of resources
- 32:04spinning up sandboxes that no one's ever going to use.
- 32:07Uh, and so that's where, but maybe it's like you've got people that are going to come in and bounce, right?
- 32:12They'll come in, try it for a second, be like, "Hey, does this thing work?"
- 32:15And then bounce.
- 32:16Uh, in that case, what you want to be able to do is you want to be able to have the sandbox there, have it be able to run their initial command, and then have it go away once,
- 32:23uh, you know, once they've done the command and maybe, you know, they'll come back again 10 minutes or so.
- 32:28Uh, you want to have that sandbox come back once they're there.
- 32:30Uh, so that's where for the sandbox life cycle, um, you need to make sure that you're basically using as little sandboxes uh, as you can at a time.
- 32:40However, you know, let's say you've got people that are running long long run processes, right?
- 32:44All right.
- 32:44So, let's say you're doing data science, web scraping, whatever.
- 32:47Uh you don't know how long uh the user's tasks are going to run, right?
- 32:50So, maybe you've got the users coming in, they're running a task that takes 10, 15 minutes, uh and then they're doing whatever, right?
- 32:58So, it's how do you get that trade-off uh between how long you keep the sandboxes sitting around uh versus not eating money into the sun.
- 33:06So with this task, what we're going to do uh is we're going to take an approach uh to our sandbox management where what we're going to do is we're going to give sandboxes a really long time
- 33:15uh to live, right?
- 33:16We're going to say, "Hey, when a user comes in and runs a command, we want that sandbox to run for as you know, as long as we want it to, but once the sandbox finishes its task,
- 33:25we're going to give it a very short timeout.
- 33:26So it'll stick around in case they give it, you know, another command, but then it'll shut itself down.
- 33:31And then that way we can free up those resources to spin up another sandbox for somebody else.
- 33:36So, we're going to go ahead open this up, right?
- 33:40Uh, this one, uh, there's no code involved, right?
- 33:43And so, all we're going to have to do here is think about, hey, when we've got these, uh, people coming in, uh, running, uh, commands, how long should things, uh, uh, the state machine,
- 33:52uh, for how long should this run, right?
- 33:54Uh, so you can read up here, right?
- 33:56This thing can take a long time.
- 33:58Uh let's say we've got a task and we think uh the initial task uh we should have the instructions on here somewhere.
- 34:07We've got a policy.
- 34:08But basically what we want to do is we want to uh allow this task along as long as as long as it wants to.
- 34:13But afterwards we want to shut it off after a minute.
- 34:16So what we'll do is we'll say hey we want this command to be able to run for an hour.
- 34:21Okay.
- 34:22So we set our command to run for an hour.
- 34:24We can then run our task.
- 34:26Okay.
- 34:27And this is all simulated because we're not going to have you guys actually wait an hour for a task to run in a sandbox.
- 34:32Uh, and what we'll do afterwards is we'll say, "Hey, I want the sandbox to only uh stick around for a minute.
- 34:38Uh, and then it should shut down afterwards."
- 34:40All right, very simple.
- 34:42What I just did there uh because we're cheating, but uh that's basically uh what the goal is here is thinking about when we've got a a sandbox that we're just going to have it uh do a task.
- 34:53Uh we wanted to stay uh around as long as the task is going to take.
- 34:57Uh but then afterwards once we get that result back we can be like hey have it go away later.
- 35:02Cool.
- 35:02So everyone able to get to this flag or is that um did I spin that uh go through that too quick?
- 35:14Up.
- 35:14Thumbs up.
- 35:15Okay.
- 35:15I see a lot of thumbs up.
- 35:16Great.
- 35:18All right.
- 35:19And then if you want to cheat uh you can just put in the code here.
- 35:22So, it's right size runtime lifetime.
- 35:26Uh, let me zoom in on that for you guys.
- 35:30All right.
- 35:31Uh, so we can come around or uh would it help if I went through that again real quick for anybody here just to show how that worked.
- 35:39Okay, I'll go through it one more time.
- 35:42All right.
- 35:42So, I'll just spin off this uh that task again.
- 35:46Yeah.
- 35:47that just like you say
- 35:51exactly
- 35:52or let's say the user has like um they're having to read a large file or they want to do video processing, right?
- 35:59That can you don't know how long that's going to take.
- 36:01Uh and so what you want to do is you want to give the sandbox a long life cycle uh so it can complete that task.
- 36:07Uh but then after it finishes the task, you don't want to keep it sitting around using resources.
- 36:12Uh so you give it a shorter timeout afterwards to be like hey unless the user starts interacting with this shut pause it shut it down put it into so you can resume it later
- 36:21if it's like a web server
- 36:25right
- 36:28exactly well cloud session is similar right so with a cloud session
- 36:32yeah speed matters right and so it's all these things uh you end up dealing with like a speed versus cost trade-off um where if a sandbox is running things are fast
- 36:41uh if it's paused, it's cheap because you can have as many of them, you know, you can have lots of them paused and not be paying for them or, you know, if you're CPU limited, you just you can't run that many sandboxes at a time.
- 36:53Um, but like for something like cloud, you don't know when the AI is going to come back to reuse that sandbox, right?
- 36:59Maybe it's using 20 sandboxes, right?
- 37:01And it uses the sandbox and it's going to So, uh, that's where it's Yeah.
- 37:06you end up having to do your sandbox.
- 37:11Yeah.
- 37:12Okay.
- 37:12So, if if if you're talking demons where it's like you want something that's persistent and long running, sandbox may not be the best thing to do there.
- 37:18Uh you can, right?
- 37:19You can definitely have a sandbox that you're like run it for a day, right?
- 37:23Uh but there's probably cheaper uh or more kind of traditional methods to do that, but again, we're running all this stuff inside of a sandbox right now inside of multiple sandboxes.
- 37:32So, you can definitely run web servers inside of them.
- 37:34Um but they're just not gonna be optimized like as far as CDNs and that.
- 37:37Yeah.
- 37:38Um
- 37:40can you use this in your main development?
- 37:43Yeah.
- 37:44Sandbox you keep adding it other folks get some replic.
- 37:53Yeah.
- 37:54So how to uh fork things.
- 37:55Exactly.
- 37:56But that's kind of where a lot of people are using these things is that you can give the AI sandbox say, "Hey, let's install the base dependencies like you would with your GitHub actions."
- 38:03So you've got kind of a basic cache thing and then you can pull it in and then build on top of it, right?
- 38:09And then that way if you're doing like work trees, right, you've got a single one.
- 38:12Each work tree has Yeah.
- 38:15Yep.
- 38:17Okay.
- 38:17So anyway, so for here, uh, go back to our life cycle, right?
- 38:21Real quick, what we want to do is basically we want to give it a really long runtime, right?
- 38:25All right.
- 38:25So, here we're going to give it an hour and then but once it once it finishes the command, we want to spin the uh the uh spin the timeout back down to a minute.
- 38:38And so, what we're going to do is we're going to set our command timeout.
- 38:41We're going to run a fake task.
- 38:44Uh and then we're going to set our uh Whoops.
- 38:47Set our lifetime back to something very uh short.
- 38:52Okay.
- 38:53And then that should give us, hey, we've solved this uh challenge.
- 39:00Cool.
- 39:01Yay.
- 39:02Complete.
- 39:04All right.
- 39:05Uh not so.
- 39:06And then this gets us into uh our next uh lab, which is our background process leaks, right?
- 39:12So uh definitely when you're coming back and reusing the same sandbox over and over again, uh you're going to run on uh run into orphans, right?
- 39:19So basically you start a process uh and then you go and do something else you come back to your machine if that machine is still running right you you end up accumulating a whole bunch of different processes running over time uh and that can kill performance of the sandbox.
- 39:33Uh for some reason with sandboxes we see this a lot.
- 39:36Um but it kind of makes sense because like you're pausing your process and coming back to it rather than getting like a new image every single time.
- 39:42Uh so it's the advantage of right resuming this old state.
- 39:47things are fast, things are where you left them.
- 39:49Downside is things are where they left them and you if you haven't cleaned up after yourself.
- 39:53So a lot of times what you have to do is you'll have to come in and try to figure out how do I uh kill my orphans.
- 40:01Actually I think a lot of sandbox management ends up being killing orphans.
- 40:05Uh you end up with uh a lot of the time also is uh related to this is uh when you start up sandboxes you need to keep track of them.
- 40:12Uh, and if you lose track of your sandboxes, uh, you need to figure out how do I go find the sandboxes that or or that I'm not managing anymore,
- 40:20uh, and make sure that I remove those resources.
- 40:22Um, so here is a demo of how to go, uh, find our orphans, right?
- 40:29And so, uh, we have our code here, uh, that we can, uh, in this nifty terminal, uh, we can go ahead and, uh, we can run some code to figure out how many orphans we have, right?
- 40:39Right.
- 40:39So, right here we can see we hop into the sandbox and we've got uh three orphans uh uh that are alive, right?
- 40:47So, we've got three children, right?
- 40:50And then if we uh search for them, what we can do is uh often your uh processes that you orphaned are going to be the same.
- 40:56Uh here uh we're able to grip for them by this nifty uh somehow they're called orphan worker.
- 41:01Uh in real world, unfortunately, they're not normally named this.
- 41:05Um, but uh for simplicity sake uh here we're going to be able to easily find them by just looking for orphans.
- 41:12And so all we need to do now is kill our uh leaked children.
- 41:22Okay.
- 41:22And actually while I'm doing this uh so how many people here have run into orphan problems on their just regular servers as far as having a bunch of processes running?
- 41:30Yep.
- 41:30Okay.
- 41:30These guys over here.
- 41:32Right.
- 41:32It's like a very common problem that you're going to run into.
- 41:36Um but uh so right, we're going to kill 448.
- 41:42Uh then we can run our script again, see how many orphans we have.
- 41:45Now we know there's two running.
- 41:47All right.
- 41:47So we still got our two orphans.
- 41:50And we're going to kill 449 and 50.
- 41:53All right.
- 41:53And now this should notice.
- 41:55There we go.
- 41:56Once we've uh gotten rid of all our orphan processes, uh the web page should notice uh that they're no longer there and give us the code to get to the next level.
- 42:05Cool.
- 42:05So, everyone able to clean up their box and uh get this code.
- 42:11Cool.
- 42:12Anyone having a hard time finding the processes that are running around and uh hasn't been able to get them yet?
- 42:17Great.
- 42:21So, we will take the slag and drop it into here.
- 42:29Okay.
- 42:31Uh so uh next thing for sandbox management that we want to uh cover real quick is uh our uh workspaces.
- 42:39All right.
- 42:39So when you first start dealing with sandboxes uh one of the first things that you do is like hey I've got all these servers I will just hand them out to users.
- 42:46Uh here we're kind of coming into we've done this at naive approach to sandbox management that we're just roundroining the sandboxes.
- 42:52So rather than uh keeping track of what user gets what sandbox uh we're just you know you come in you get a sandbox and then uh right and so what we want to do here is this is the first uh code exercise
- 43:03uh is we're going to want to go look at our Python code that's on uh so we have a little basically uh handler inside of here uh and we're going to want to modify it.
- 43:11So instead of giving us a roundroin uh sandbox assignment we're going to keep track by user of what sandbox they get.
- 43:17Um, we didn't want to blow up our servers uh with spawning a ton of set boxes that we don't need.
- 43:22So, we have a bunch of mocks uh that are going to let us uh test what happens uh with our management.
- 43:29And so, if we open up this uh terminal, we can go into our uh router.py or router.js.
- 43:36I think most of us know Python, so we're going to go with the Python today.
- 43:40All right.
- 43:42Um, we have a read me in here as well, but we're running out of time.
- 43:47So, um, actually, let's see if I have instructions on this page, too.
- 43:52Yeah.
- 43:53So, basically, it's right now we've got a a code that runs around Robin.
- 43:56We want to change our code.
- 43:57So, instead of being around Robin, we're going to assign this to users.
- 44:00Uh, the way that you do it normally is you'll have a database keeping track of, hey, here's all my users.
- 44:04Here, here's all the active sandboxes for each of the users.
- 44:06Uh, keeping this persistent generally is useful.
- 44:10Uh so that way you can go back historic over historic data and figure out like were we reassigning too many sandboxes to users or what was going on.
- 44:17Um but for here uh we're just going to have this assignment dictionary.
- 44:23And so all we're going to need to do is we've got this assign sandbox function down here.
- 44:27And so right now it's just assigning it.
- 44:30And so what we're going to do is we're just going to quick modify this.
- 44:33Right.
- 44:34So we've got that nifty assignments.
- 44:37Oh, okay.
- 44:3915 minutes left.
- 44:41So, check if we've already kept track of this guy in our assignments.
- 44:46Also, very hard to uh type on a screen that's way down there.
- 44:50Uh, and we're going to return assignments of
- 44:53[snorts]
- 44:53user ID.
- 44:58We've already got this function here that's going to get us the sandbox ID from a sandbox.
- 45:01So, we'll say sandbox ID equals that thing.
- 45:07All right.
- 45:07And basically, we're just following this.
- 45:09Uh, you should have instructions.
- 45:11Oh, we don't have instructions.
- 45:12All right.
- 45:13So, we're going to cheat.
- 45:15So, uh, uh, if anyone is, has anyone already gotten past this level?
- 45:20Okay.
- 45:20So, a couple of us have already gotten past this level.
- 45:22Uh, so it is solvable in the time that we had here.
- 45:26Uh, but so all we're going to do is we're going to assign uh, the sandbox ID here and we'll return the sandbox ID.
- 45:34Right?
- 45:34So what this is going to do is now assignments is going to be our cache of hey this is the ID that each user gets assigned uh and then we'll return that otherwise we'll have to create new sandboxes for everybody uh and return that sandbox ID.
- 45:46Okay.
- 45:48Uh okay great question.
- 45:50All right so basically what we want to do is all we need uh the point of this is just saying we want to keep track of what user had what sandbox.
- 45:58So you're creating a map of user to sandbox ID.
- 46:02Right?
- 46:05That's that's that's the only point.
- 46:07Uh so kind of starting with, hey, we're not keeping track of any of our sandboxes.
- 46:12So now it's like, hey, each user is going to have a dedicated sandbox so they can rerun code uh in the same sandbox every time.
- 46:19Okay.
- 46:20And then we should have some tests in here uh that we can run.
- 46:26And hopefully uh y'all are better coders than me.
- 46:32Uh, line 2. What did I mess up?
- 46:50All right, it'll run the test real quick.
- 46:54And I'm going to fail my tests.
- 46:58It's not false is not true.
- 47:04Uh, one second.
- 47:08Sorry.
- 47:13Oh, good point.
- 47:13Exactly.
- 47:14See, that was a test of the audience and good job.
- 47:16You passed.
- 47:19So, right, we need to add it to the assignments.
- 47:32And so now that uh we're actually adding our sandbox ID to the assignments, uh we should then um pass.
- 47:41Great.
- 47:42And now that we passed, we should pick up over here that we have passed or come on.
- 48:02All right.
- 48:03So, remember how I told you about how we learned about the uh uh we learned about the uh orphans?
- 48:10Well, we have quite a few orphans running now.
- 48:12Okay, there we go.
- 48:16So, took a minute, but this let's just get to the next lag.
- 48:21Uh, right.
- 48:22Cool.
- 48:23Everyone able to get that?
- 48:26Cool.
- 48:30And we'll post that here.
- 48:35All right.
- 48:36Uh, file system permissions.
- 48:38All right.
- 48:38So, uh I I think both cloud code and codeex have this is that a lot of times you don't want your agents writing to every single part of your file system.
- 48:46You're going to have different parts of your file system uh that you want people writing to and reading to.
- 48:50Um normally this will go into your agents.mmd saying, "Hey, this is what I want you to write to, what I uh want you to read to."
- 48:57Uh for these purposes, we're just going to hardcode this.
- 49:02But same thing uh right so you're going to have uh often you want to have read uh write parts of your file system.
- 49:08So here let's take a look uh so uh we've got a cache config and so uh v cache.
- 49:25All right and then we can do the same thing.
- 49:27So here uh basically we've got a template cache and a runtime cache.
- 49:30Uh so this is where when we build our templates, we're going to have a cache that we're putting our template uh information to that might be uh readon.
- 49:37We've got a different cache that we want to uh write to.
- 49:40So all we're going to do is for our crasher, we're going to have uh refer to this uh cashier which we're going to spell correctly.
- 49:50And uh there we go.
- 49:54Cool.
- 49:54So, that was a very fast one where all we're doing is making sure that we're uh writing to our uh runtime cache.
- 50:02All right.
- 50:03Uh at this point, let's see.
- 50:06I think you all can do the rest of this on your own.
- 50:09We've got about 10 minutes left uh to talk about sandboxes.
- 50:13Um so, yeah.
- 50:16Uh hopefully that was a good introduction to hear uh issues that you're going to run into with your sandboxes as far as managing uh what's able to do what, what's able to read to what.
- 50:24Uh, we've got about eight more levels.
- 50:28Um, actually, I'll leave this to you guys.
- 50:30Do you think it'd be helpful to continue walking through all these or more fun to just talk about sandboxes?
- 50:36All right, let's talk about sandboxes.
- 50:37Great.
- 50:38Um, let's see.
- 50:41Uh, so who here who here is currently running sandboxes in production?
- 50:44Oh, wow.
- 50:45Those guys back there are running sandboxes.
- 50:46Anyone else here running sandboxes?
- 50:48Those guys over there.
- 50:49Uh, what are you guys doing with sandboxes?
- 50:51agent works.
- 50:53Agent workloads.
- 50:54Cool.
- 50:55Do you need to be
- 50:58Oh, okay.
- 50:58You know, no one's perfect.
- 51:00Not yet.
- 51:00Okay.
- 51:01Uh we've Travis is over there.
- 51:02You should go talk to him.
- 51:05Uh and then what do you do?
- 51:10Okay, cool.
- 51:11Woohoo.
- 51:11He a great.
- 51:12Um yeah.
- 51:14Yeah.
- 51:14So, any of the uh issues that we just covered, have you run into any of those?
- 51:19Uh not yet.
- 51:20Oh, okay.
- 51:22Gotcha.
- 51:23Yeah.
- 51:23Yeah.
- 51:23And so we are uh part of what we do is we try to make it so you don't run into issues.
- 51:27Um but your user you're always going to run into something where it's uh something is happening on the sandbox.
- 51:32You need to hop in debug it and figure out why is this thing breaking.
- 51:36Um great.
- 51:36And then we had some guys doing sandboxes over here.
- 51:38Yeah.
- 51:39So I have a slightly different use case.
- 51:41Yeah.
- 51:48Okay.
- 51:49So sorry.
- 51:50Uh just so everyone else can hear.
- 51:51So you've got your vanilla production on your on your laptop.
- 51:54Okay.
- 51:54Then I want to spread it across on several GPUs which are like small what you call small GPUs.
- 52:02Okay.
- 52:03Collect the data back.
- 52:04Okay.
- 52:05Processes over here and they are across what you call networks different providers.
- 52:09Yep.
- 52:10So basically you're saying you you've got your code local local you want to put it onto a bunch of distributed GPUs process the uh the workload and then send it all back to to local okay
- 52:20I want back
- 52:22yeah so you want the data back yep
- 52:25yeah so right now we don't support GPUs but that's of course a common use case that you can you know when you're spinning up these contain uh whatever they are so for us we use VMs a lot of people also use containers
- 52:35uh common use case is you'll be like hey uh take the output of whatever's running into and send a post request home with the data that I want it to uh to have.
- 52:44Uh that's like all these depending on how how big the workload are, uh you're going to have different bottlenecks and challenges.
- 52:53Um where we've had, you know, it's one of the weirdest things about sandboxes, right, is that uh when you're just running a couple, you've got certain problems that are like, hey, why is this behavior,
- 53:03you know, why is one or two sandboxes breaking?
- 53:05Once you're dealing with a lot of sandboxes, uh then your problems become how do I manage all, you know, just just the logging overhead of how do I keep track of these?
- 53:14How do I make sure that I'm assigning all these um uh keep track of the network for the machines that it's running on, right?
- 53:19So each machine can only be talking to so many sandboxes at a time.
- 53:23But uh yeah, definitely if you're running on GPUs, EDB doesn't do GPUs.
- 53:27Um and I guess so yeah that's where the sandbox solution might not be although why would you need sandboxes for that as opposed to just having the GPU
- 53:39because I can get it at any place at whatever cost.
- 53:43Gotcha.
- 53:47I want it.
- 53:54Makes sense.
- 53:54Yeah.
- 53:55And that's that's a common use case.
- 53:56Uh, I just don't know enough about that, I guess, to give a good answer.
- 54:00Cool.
- 54:01Uh, and then we had someone else over here using sandboxes.
- 54:03Okay.
- 54:08Something Kubernetes.
- 54:11Cloud and Kubernetes.
- 54:24Yes.
- 54:25So, okay.
- 54:26So one of his questions is how do you deal with the storage over time right so how do you prune uh the resources that you you develop so one of the problems with sandboxes
- 54:33is uh you can create lots of them but then it's where do you store them uh that's an active challenge that we're currently working on if you if that interests you we are hiring
- 54:42um uh and again uh if if you do go uh we're uh hiring go engineers so our backends go uh a lot of really fun challenges there how do we uh optimize speed
- 54:53uh performance and then especially on storage uh how do you deal with the compression uh and uh uh that sort of challenge.
- 55:00uh
- 55:00volumes
- 55:01that sorry
- 55:03volumes right oh yes we also have volumes um and so that's where if you have shared resources that multiple things can share uh volumes are great for that um but yeah it's I think all this is very early and nobody knows where it's going to go
- 55:15uh so as the smart pe you smart people in this room are going to come up with better solutions uh that optimize things uh don't know if that's a good answer uh but yeah so for your question on cloud right so it's you can run cloud in sandboxes pretty easy
- 55:29Um uh where where'd we go?
- 55:32So it need to be right.
- 55:33So the same way that we uh spun up these guys, we can just be like template equals I think claude should spin us up a cloud code.
- 55:42I'm guessing at what things do.
- 55:44Okay.
- 55:44Yeah, I think we have claude on here, right?
- 55:47So yeah, you can run cloud in a sandbox.
- 55:49Um right, you can run open code, right?
- 55:51Uh codec in a sandbox.
- 55:53Uh basically these give us places where you can have agents run remotely or locally you can have the agent talk to it.
- 55:59Um and uh you get the same thing.
- 56:02But yeah as far as cube uh so we are firecracker uh based um and so we're trying there's some technical issues uh with cube uh that we have that we haven't quite solved.
- 56:14Uh so right now we're uh running Nomad uh but working on getting uh into cube.
- 56:20Yeah.
- 56:21Cool.
- 56:23across sandboxes.
- 56:30Yes.
- 56:31Yeah.
- 56:31Yeah.
- 56:31So that's definitely common.
- 56:32Uh definitely doable.
- 56:33Uh we didn't do that for this exercise.
- 56:35Uh so what we kind of did for this where you were the coordinator, right?
- 56:40So basically the sandbox uh you clicked on a thing and said, "Hey, start a new sandbox uh from this template."
- 56:48uh that wasn't automated in this case because I didn't want to deal with uh making everyone grab their API keys.
- 56:53Uh I also didn't trust myself to this is being recorded uh and to not expose my own API keys by putting them up on the screen.
- 57:00Yeah.
- 57:00Um but yeah, definitely that's kind of cool that you can get that inception that you have a sandbox and then it spawns more things.
- 57:06Cool.
- 57:07Uh we got time for two more.
- 57:09Yeah.
- 57:10So what's the ecosystem of these sandboxes like after the all of these do you see that like a docker ecosystem of sandboxes are everywhere.
- 57:22Yeah.
- 57:22So the question is what's the ecosystem of sandboxes?
- 57:25Uh is it going to be like docker?
- 57:26Uh and I mean all this is early right so like these AI agents are what like two years old LLM as a service 5 years old.
- 57:35Um nobody knows what the ecosystem is going to look like but definitely as people build cool things uh we tend to standardize around them share how to do it.
- 57:43Uh and then that leads to uh yeah so and that's where our templates come in right where again you know here I had a template and 200 of you guys were able to then reuse that same sandbox
- 57:55uh without too much of a uh yeah so we're going that direction but time will tell yes
- 58:09we actually okay so internally a to b uh we're running I Yes, we run locally especially for testing, right?
- 58:17Um because uh running in the cloud is just a pain.
- 58:19But as far as like uh and so yeah, actually we're doing a lot of local uh uh development.
- 58:33Yeah.
- 58:33So I mean that's where so our sandboxes have different rules that you can set for the uh network.
- 58:38Uh that's where if you give it access to secrets, you defin want to uh prevent what it's going to be able to send out.
- 58:45Uh if it doesn't have secrets or just got dev keys maybe.
- 58:48And so that's right.
- 58:50It's the ease versus uh security.
- 58:53Cool.
- 58:54Anybody else?
- 58:56Going once, going twice.
- 58:57Anyway, hope you all had fun.
- 58:59Uh the you can go ahead and complete this uh these challenges on your own.
- 59:03Uh thanks for coming and again I'm Matt with E2B and uh it was a pleasure meeting you all.
- 59:10[applause]
- 59:30[music]