Skip to content

Commit 2d7bce9

Browse files
authored
[Doc] add env vars to the doc (#4572)
1 parent ce3f1ee commit 2d7bce9

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Documentation
7575
serving/deploying_with_docker
7676
serving/distributed_serving
7777
serving/metrics
78+
serving/env_vars
7879
serving/usage_stats
7980
serving/integrations
8081

docs/source/serving/env_vars.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Environment Variables
2+
========================
3+
4+
vLLM uses the following environment variables to configure the system:
5+
6+
.. literalinclude:: ../../../vllm/envs.py
7+
:language: python
8+
:start-after: begin-env-vars-definition
9+
:end-before: end-env-vars-definition

vllm/envs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
VLLM_USE_RAY_COMPILED_DAG: bool = False
2929
VLLM_WORKER_MULTIPROC_METHOD: str = "spawn"
3030

31+
# The begin-* and end* here are used by the documentation generator
32+
# to extract the used env vars.
33+
34+
# begin-env-vars-definition
35+
3136
environment_variables: Dict[str, Callable[[], Any]] = {
3237
# used in distributed environment to determine the master address
3338
'VLLM_HOST_IP':
@@ -148,6 +153,8 @@
148153
lambda: os.getenv("VLLM_WORKER_MULTIPROC_METHOD", "spawn"),
149154
}
150155

156+
# end-env-vars-definition
157+
151158

152159
def __getattr__(name):
153160
# lazy evaluation of environment variables

0 commit comments

Comments
 (0)