Skip to content

Commit

Permalink
Allow control of some serve configuration via env vars (ray-project#4…
Browse files Browse the repository at this point in the history
…7533)

When a serve app is launched, serve will startup automatically. In
certain places like k8s, it can be difficult to preconfigure serve (e.g.
in the [ray-cluster helm
chart](https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/values.yaml)
there is no ability to set the default serve arguments).

This means you need to either be explicit when you start serve, or if it
starts up automatically you may need to shut it down, then restart it,
which is inconvenient.

Signed-off-by: Tim Paine <[email protected]>
Signed-off-by: ujjawal-khare <[email protected]>
  • Loading branch information
timkpaine authored and ujjawal-khare committed Oct 15, 2024
1 parent 3536fb7 commit 32e62dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/ray/serve/_private/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#: Ray namespace used for all Serve actors
SERVE_NAMESPACE = "serve"

#: HTTP Address
DEFAULT_HTTP_ADDRESS = os.environ.get(
"RAY_SERVE_DEFAULT_HTTP_ADDRESS", "http://127.0.0.1:8000"
)

#: HTTP Host
DEFAULT_HTTP_HOST = os.environ.get("RAY_SERVE_DEFAULT_HTTP_HOST", "127.0.0.1")

Expand Down

0 comments on commit 32e62dc

Please sign in to comment.