Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
47f5e03b
Unverified
Commit
47f5e03b
authored
Sep 16, 2024
by
Kevin Lin
Committed by
GitHub
Sep 16, 2024
Browse files
[Bugfix] Bind api server port before starting engine (#8491)
parent
2759a43a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+6
-0
No files found.
vllm/entrypoints/openai/api_server.py
View file @
47f5e03b
...
...
@@ -5,6 +5,7 @@ import multiprocessing
import
os
import
re
import
signal
import
socket
import
tempfile
from
argparse
import
Namespace
from
contextlib
import
asynccontextmanager
...
...
@@ -525,6 +526,9 @@ async def run_server(args, **uvicorn_kwargs) -> None:
logger
.
info
(
"vLLM API server version %s"
,
VLLM_VERSION
)
logger
.
info
(
"args: %s"
,
args
)
temp_socket
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
temp_socket
.
bind
((
""
,
args
.
port
))
def
signal_handler
(
*
_
)
->
None
:
# Interrupt server on sigterm while initializing
raise
KeyboardInterrupt
(
"terminated"
)
...
...
@@ -541,6 +545,8 @@ async def run_server(args, **uvicorn_kwargs) -> None:
model_config
=
await
async_engine_client
.
get_model_config
()
init_app_state
(
async_engine_client
,
model_config
,
app
.
state
,
args
)
temp_socket
.
close
()
shutdown_task
=
await
serve_http
(
app
,
limit_concurrency
=
async_engine_client
.
limit_concurrency
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment