[gRPC] Native server: launcher + HTTP + server args wiring (3/4) (#23508)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
801571e949
commit
3d2e7cc601
@@ -13,10 +13,10 @@ suppress_noisy_warnings()
|
||||
|
||||
|
||||
def run_server(server_args):
|
||||
"""Run the server based on server_args.grpc_mode and server_args.encoder_only."""
|
||||
"""Run the server based on the gRPC flags and server_args.encoder_only."""
|
||||
if server_args.encoder_only:
|
||||
# For encoder disaggregation
|
||||
if server_args.grpc_mode:
|
||||
if server_args.smg_grpc_mode or server_args.grpc_mode:
|
||||
from sglang.srt.disaggregation.encode_grpc_server import (
|
||||
serve_grpc_encoder,
|
||||
)
|
||||
@@ -26,10 +26,11 @@ def run_server(server_args):
|
||||
from sglang.srt.disaggregation.encode_server import launch_server
|
||||
|
||||
launch_server(server_args)
|
||||
elif server_args.grpc_mode:
|
||||
# TODO: Once the native Rust gRPC server starts alongside HTTP in the
|
||||
# default path below (controlled by SGLANG_ENABLE_GRPC / SGLANG_GRPC_PORT),
|
||||
# remove this legacy SMG path and the grpc_mode flag.
|
||||
elif server_args.smg_grpc_mode:
|
||||
# Legacy SMG gRPC server (--smg-grpc-mode, or the deprecated --grpc-mode
|
||||
# which __post_init__ folds into smg_grpc_mode). The native Rust gRPC
|
||||
# server is a separate path, enabled by --grpc-port, that starts
|
||||
# alongside the default HTTP server below.
|
||||
from sglang.srt.entrypoints.grpc_server import serve_grpc
|
||||
|
||||
asyncio.run(serve_grpc(server_args))
|
||||
|
||||
Reference in New Issue
Block a user