Deploying and invoking web endpoints on Beam
task_queue
instead.beam serve
monitors changes in your local file system, live-reloads the remote environment as you work, and forwards remote container logs to your local shell.
Serve is great for prototyping. You can develop in a containerized cloud environment in real-time, with adjustable CPU, memory, GPU resources.
It’s also great for testing an app before deploying it. Served functions are orchestrated identically to deployments, which means you can test your Beam workflow end-to-end before deploying.
To start an ephemeral serve
session, you’ll use the serve
command:
multiply
function in app.py
, run:
Ctrl + C
in the terminal where you started the session.
.beamignore
.Show Logs
keep_warm_seconds
parameter. The container will be billed for the time it is active and handling requests.