[Doc] Add environment variables doc (#519)
### What this PR does / why we need it? Add environment variables doc. --------- Signed-off-by: shen-shanshan <467638484@qq.com>
This commit is contained in:
@@ -45,6 +45,7 @@ faqs
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
user_guide/suppoted_features
|
user_guide/suppoted_features
|
||||||
user_guide/supported_models
|
user_guide/supported_models
|
||||||
|
user_guide/env_vars
|
||||||
user_guide/release_notes
|
user_guide/release_notes
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|||||||
9
docs/source/user_guide/env_vars.md
Normal file
9
docs/source/user_guide/env_vars.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Environment Variables
|
||||||
|
|
||||||
|
vllm-ascend uses the following environment variables to configure the system:
|
||||||
|
|
||||||
|
:::{literalinclude} ../../../vllm_ascend/envs.py
|
||||||
|
:language: python
|
||||||
|
:start-after: begin-env-vars-definition
|
||||||
|
:end-before: end-env-vars-definition
|
||||||
|
:::
|
||||||
@@ -1,6 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
|
||||||
|
# This file is a part of the vllm-ascend project.
|
||||||
|
#
|
||||||
|
# This file is mainly Adapted from vllm-project/vllm/vllm/envs.py
|
||||||
|
# Copyright 2023 The vLLM team.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from typing import Any, Callable, Dict
|
from typing import Any, Callable, Dict
|
||||||
|
|
||||||
|
# The begin-* and end* here are used by the documentation generator
|
||||||
|
# to extract the used env vars.
|
||||||
|
|
||||||
|
# begin-env-vars-definition
|
||||||
|
|
||||||
env_variables: Dict[str, Callable[[], Any]] = {
|
env_variables: Dict[str, Callable[[], Any]] = {
|
||||||
# max compile thread num
|
# max compile thread num
|
||||||
"MAX_JOBS":
|
"MAX_JOBS":
|
||||||
@@ -31,6 +56,8 @@ env_variables: Dict[str, Callable[[], Any]] = {
|
|||||||
lambda: os.getenv("LLMDATADIST_SYNC_CACHE_WAIT_TIME", "5000")
|
lambda: os.getenv("LLMDATADIST_SYNC_CACHE_WAIT_TIME", "5000")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# end-env-vars-definition
|
||||||
|
|
||||||
|
|
||||||
def __getattr__(name: str):
|
def __getattr__(name: str):
|
||||||
# lazy evaluation of environment variables
|
# lazy evaluation of environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user