mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[Feature] add cli command serve (#4226)
This commit is contained in:
@@ -17,17 +17,19 @@
|
||||
# This file is modified from https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/cli/main.py
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.metadata
|
||||
from fastdeploy import __version__
|
||||
|
||||
|
||||
def main():
|
||||
import fastdeploy.entrypoints.cli.benchmark.main
|
||||
import fastdeploy.entrypoints.cli.openai
|
||||
import fastdeploy.entrypoints.cli.serve
|
||||
from fastdeploy.utils import FlexibleArgumentParser
|
||||
|
||||
CMD_MODULES = [
|
||||
fastdeploy.entrypoints.cli.openai,
|
||||
fastdeploy.entrypoints.cli.benchmark.main,
|
||||
fastdeploy.entrypoints.cli.serve,
|
||||
]
|
||||
|
||||
parser = FlexibleArgumentParser(description="FastDeploy CLI")
|
||||
@@ -35,7 +37,7 @@ def main():
|
||||
"-v",
|
||||
"--version",
|
||||
action="version",
|
||||
version=importlib.metadata.version("fastdeploy-gpu"),
|
||||
version=__version__,
|
||||
)
|
||||
subparsers = parser.add_subparsers(required=False, dest="subparser")
|
||||
cmds = {}
|
||||
|
Reference in New Issue
Block a user