remove brightstaff cli

This commit is contained in:
Adil Hafeez 2025-05-16 16:30:45 -07:00
parent 5df7490322
commit ef65527ff0
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
9 changed files with 32 additions and 140 deletions

View file

@ -6,8 +6,6 @@ import requests
from cli.consts import (
ARCHGW_DOCKER_IMAGE,
ARCHGW_DOCKER_NAME,
BRIGHTSTAFF_DOCKER_IMAGE,
BRIGHTSTAFF_DOCKER_NAME,
)
from cli.utils import getLogger
@ -60,7 +58,8 @@ def docker_start_archgw_detached(
port_mappings_args = [item for port in port_mappings for item in ("-p", port)]
volume_mappings = [
f"{logs_path_abs}:/var/log:rw",
# TODO: fix log path
# f"{logs_path_abs}:/var/log:rw",
f"{arch_config_file}:/app/arch_config.yaml:ro",
# "/Users/adilhafeez/src/intelligent-prompt-gateway/crates/target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins:ro",
]
@ -86,48 +85,6 @@ def docker_start_archgw_detached(
return result.returncode, result.stdout, result.stderr
def docker_start_brightstaff_detached(
arch_config_file: str,
env: dict,
) -> str:
env_args = [item for key, value in env.items() for item in ["-e", f"{key}={value}"]]
port_mappings = [
"9091:9091",
]
port_mappings_args = [item for port in port_mappings for item in ("-p", port)]
volume_mappings = [
f"{arch_config_file}:/app/arch_config.yaml:ro",
]
volume_mappings_args = [
item for volume in volume_mappings for item in ("-v", volume)
]
llm_provider_endpoint = env.get(
"LLM_PROVIDER_ENDPOINT", "http://host.docker.internal:12000/v1/chat/completions"
)
options = [
"docker",
"run",
"-d",
"--name",
BRIGHTSTAFF_DOCKER_NAME,
*port_mappings_args,
*volume_mappings_args,
*env_args,
"-e",
f"LLM_PROVIDER_ENDPOINT={llm_provider_endpoint}",
"--add-host",
"host.docker.internal:host-gateway",
BRIGHTSTAFF_DOCKER_IMAGE,
]
result = subprocess.run(options, capture_output=True, text=True, check=False)
return result.returncode, result.stdout, result.stderr
def health_check_endpoint(endpoint: str) -> bool:
try:
response = requests.get(endpoint)