- class ray.serve.Application#
One or more deployments bound with arguments that can be deployed together.
Can be passed into another
Deployment.bind()to compose multiple deployments in a single application, passed to
serve.run, or deployed via a Serve config file.
For example, to define an Application and run it in Python:
from ray import serve from ray.serve import Application @serve.deployment class MyDeployment: pass app: Application = MyDeployment.bind(OtherDeployment.bind()) serve.run(app)
To run the same app using the command line interface (CLI):
serve run python_file:app
To deploy the same app via a config file:
applications: my_app: import_path: python_file:app