diff --git a/vllm/envs.py b/vllm/envs.py index b140aa6d658e6..a9f44aacef461 100644 --- a/vllm/envs.py +++ b/vllm/envs.py @@ -105,7 +105,7 @@ # by incrementing the VLLM_PORT value. # '0' is used to make mypy happy 'VLLM_PORT': - lambda: int(os.getenv('VLLM_PORT', '0')) + lambda: int(os.getenv('VLLM_PORT', '0').split(":")[-1]) if 'VLLM_PORT' in os.environ else None, # If true, will load models from ModelScope instead of Hugging Face Hub.