ray.serve.config.ControllerOptions#

pydantic model ray.serve.config.ControllerOptions[source]#

Options for the Serve controller actor.

Symmetric with HTTPOptions and gRPCOptions: pass to serve.start(controller_options=...) / serve.run from Python, or as a top-level controller_options: block in serve run foo.yaml.

v0 scope is intentionally narrow: only runtime_env is exposed, and inside runtime_env only env_vars is accepted. Other runtime_env fields (pip, working_dir, py_modules, container, …) would mutate Serve’s own dependencies on a detached, long-lived actor and are intentionally rejected by the validator. Per-replica runtime environments belong on the deployment (serve.deployment(runtime_env=...)) instead.

Like HTTPOptions, these options only take effect when the controller is first created. If a Serve controller is already running in the cluster, serve.start warns and ignores the new options.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

field runtime_env: Dict[str, Any] | None = None#

Runtime environment for the controller actor. Only the env_vars key is supported; other keys are rejected.