Running code remotely
This tutorial introduces several key concepts:- You can wrap any code in a
function()
decorator to run it on the cloud - You can invoke a function locally with
.local()
- You can invoke a function remotely with
.remote()
- You can fan out workloads to hundreds or thousands of containers with
.map()
app.py
with the name of your file.
.map()
method in main()
spawns 5 remote containers, but that number is arbitrary.
You can change 5
to 500
, and invoke this function again — you’ll see 500 containers spin up almost instantly.