mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
add ips check (#7352)
* commit * commit --------- Co-authored-by: “liuruian” <liuruian@baidu.com>
This commit is contained in:
@@ -80,6 +80,7 @@ from fastdeploy.utils import (
|
|||||||
StatefulSemaphore,
|
StatefulSemaphore,
|
||||||
api_server_logger,
|
api_server_logger,
|
||||||
console_logger,
|
console_logger,
|
||||||
|
get_host_ip,
|
||||||
get_version_info,
|
get_version_info,
|
||||||
is_port_available,
|
is_port_available,
|
||||||
retrive_model_from_server,
|
retrive_model_from_server,
|
||||||
@@ -964,6 +965,11 @@ def launch_worker_monitor():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""main函数"""
|
"""main函数"""
|
||||||
|
|
||||||
|
if args.ips and get_host_ip() not in args.ips:
|
||||||
|
api_server_logger.error(f"Worker IP {get_host_ip()} not in the list of allowed IPs {args.ips}.")
|
||||||
|
return
|
||||||
|
|
||||||
if args.local_data_parallel_id == 0:
|
if args.local_data_parallel_id == 0:
|
||||||
if not load_engine():
|
if not load_engine():
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user