Skip to content

Commit

Permalink
[Doc] add env vars to the doc (vllm-project#4572)
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao authored May 3, 2024
1 parent ce3f1ee commit 2d7bce9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Documentation
serving/deploying_with_docker
serving/distributed_serving
serving/metrics
serving/env_vars
serving/usage_stats
serving/integrations

Expand Down
9 changes: 9 additions & 0 deletions docs/source/serving/env_vars.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Environment Variables
========================

vLLM uses the following environment variables to configure the system:

.. literalinclude:: ../../../vllm/envs.py
:language: python
:start-after: begin-env-vars-definition
:end-before: end-env-vars-definition
7 changes: 7 additions & 0 deletions vllm/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
VLLM_USE_RAY_COMPILED_DAG: bool = False
VLLM_WORKER_MULTIPROC_METHOD: str = "spawn"

# The begin-* and end* here are used by the documentation generator
# to extract the used env vars.

# begin-env-vars-definition

environment_variables: Dict[str, Callable[[], Any]] = {
# used in distributed environment to determine the master address
'VLLM_HOST_IP':
Expand Down Expand Up @@ -148,6 +153,8 @@
lambda: os.getenv("VLLM_WORKER_MULTIPROC_METHOD", "spawn"),
}

# end-env-vars-definition


def __getattr__(name):
# lazy evaluation of environment variables
Expand Down

0 comments on commit 2d7bce9

Please sign in to comment.