Skip to content

Commit

Permalink
Add host parameter for uvicorn (#44)
Browse files Browse the repository at this point in the history
add host

Co-authored-by: “Sunghyun <[email protected]>
  • Loading branch information
sunggg and “Sunghyun authored Nov 1, 2023
1 parent 5ab11f5 commit 911ba9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serve/mlc_serve/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def parse_args():
# /opt/bin/cuda-reserve.py --num-gpus 2 python -m mlc_serve --local-id vicuna-v1-7b-q0f16 --num-shards 2 --max-num-batched-tokens 2560 --max-input-len 256

args = argparse.ArgumentParser()
args.add_argument("--host", type=str, default="127.0.0.1")
args.add_argument("--port", type=int, default=8000)
args.add_argument("--local-id", type=str, required=True)
args.add_argument("--artifact-path", type=str, default="dist")
Expand Down Expand Up @@ -89,6 +90,7 @@ def run_server():
app = create_app(connector)
uvicorn.run(
app,
host=args.host,
port=args.port,
reload=False,
access_log=False,
Expand Down

0 comments on commit 911ba9e

Please sign in to comment.