mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
remove brightstaff cli
This commit is contained in:
parent
5df7490322
commit
ef65527ff0
9 changed files with 32 additions and 140 deletions
|
|
@ -8,7 +8,6 @@ from cli.utils import getLogger
|
|||
from cli.consts import (
|
||||
ARCHGW_DOCKER_IMAGE,
|
||||
ARCHGW_DOCKER_NAME,
|
||||
BRIGHTSTAFF_DOCKER_NAME,
|
||||
KATANEMO_LOCAL_MODEL_LIST,
|
||||
)
|
||||
from huggingface_hub import snapshot_download
|
||||
|
|
@ -17,7 +16,6 @@ from cli.docker_cli import (
|
|||
docker_container_status,
|
||||
docker_remove_container,
|
||||
docker_start_archgw_detached,
|
||||
docker_start_brightstaff_detached,
|
||||
docker_stop_container,
|
||||
health_check_endpoint,
|
||||
stream_gateway_logs,
|
||||
|
|
@ -122,42 +120,6 @@ def start_arch(arch_config_file, env, log_timeout=120, foreground=False):
|
|||
stop_docker_container()
|
||||
|
||||
|
||||
def start_brightstaff(arch_config_file, env, log_timeout=120, foreground=False):
|
||||
"""
|
||||
Start Docker Compose in detached mode and stream logs until services are healthy.
|
||||
|
||||
Args:
|
||||
path (str): The path where the prompt_config.yml file is located.
|
||||
log_timeout (int): Time in seconds to show logs before checking for healthy state.
|
||||
"""
|
||||
log.info("Starting brightstaff")
|
||||
|
||||
try:
|
||||
brightstaff_container_status = docker_container_status(BRIGHTSTAFF_DOCKER_NAME)
|
||||
if brightstaff_container_status != "not found":
|
||||
log.info(
|
||||
f"brightstaff found in docker, stopping and removing it: status: {brightstaff_container_status}"
|
||||
)
|
||||
docker_stop_container(BRIGHTSTAFF_DOCKER_NAME)
|
||||
docker_remove_container(BRIGHTSTAFF_DOCKER_NAME)
|
||||
|
||||
return_code, _, brightstaff_stderr = docker_start_brightstaff_detached(
|
||||
arch_config_file,
|
||||
env,
|
||||
)
|
||||
if return_code != 0:
|
||||
log.info("Failed to start brightstaff: " + str(return_code))
|
||||
log.info("stderr: " + brightstaff_stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if foreground:
|
||||
stream_gateway_logs(follow=True, service="brightstaff")
|
||||
|
||||
except KeyboardInterrupt:
|
||||
log.info("Keyboard interrupt received, stopping arch gateway service.")
|
||||
stop_docker_container(service=BRIGHTSTAFF_DOCKER_NAME)
|
||||
|
||||
|
||||
def stop_docker_container(service=ARCHGW_DOCKER_NAME):
|
||||
"""
|
||||
Shutdown all Docker Compose services by running `docker-compose down`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue