deploy() takes a strategy that decides where the solution runs. Five ship, plus AUTO, which picks one for you.
Which strategy should I use?
In Python the values are
DeployStrategy.LOCAL and so on; on the CLI they are lowercase, as --strategy docker.
Local
Runs the solution as a plain Python process in the current environment. Nothing to install, easiest to debug, no isolation.main.py exposing predict() and the runner imports it. Its run_interface is {type: function, module: main, callable: predict}.
Docker
Runs the solution in a container, so system dependencies and Python versions stay contained. Needs Docker installed and running.http://localhost:8000/predict, from a container named solution-container.
Dockerfile the adapter generates
Dockerfile the adapter generates
Modal
Runs on Modal’s serverless platform, which is the quickest route to a GPU you do not have to operate. Needspip install modal && modal token new.
T4/16Gi as its default resources and calls a predict function; the generated app itself starts CPU-only, with the GPU line ready to uncomment.
Modal app the adapter generates
Modal app the adapter generates
BentoML
Packages the solution as a BentoML service for self-hosted production serving. Needspip install bentoml.
4Gi of memory, served at /predict against the bentocloud provider.
BentoML service the adapter generates
BentoML service the adapter generates
LangGraph
Deploys the solution as a LangGraph agent workflow, with state, tools, streaming and checkpoints. Needspip install langgraph.
agent.py, main.py and langgraph.json; the runner calls the deployed graph on LangGraph Platform via langgraph_sdk, against assistant id agent.
How does AUTO choose?
AUTO is the default. A selector agent reads the solution and picks a target from the code itself rather than from a rule table:
selector_instruction.txt describing when it is the right answer, so the choice is made from those descriptions.
Name a strategy explicitly when you already know the answer; AUTO costs a model call.
How do I pass environment variables?
--env:
Related
Deployment architecture
How the selector, adapter and runner fit together
Adding a strategy
Write your own target
pip install leeroo-kapso · Every page as plain text: llms.txt.