mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
cleanup, moving stuff to common, nuke utils
This commit is contained in:
parent
fe582a739d
commit
803976df26
13 changed files with 263 additions and 396 deletions
|
@ -11,7 +11,7 @@ from pathlib import Path
|
|||
import yaml
|
||||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.utils import DISTRIBS_BASE_DIR
|
||||
from llama_toolchain.common.config_dirs import DISTRIBS_BASE_DIR
|
||||
|
||||
|
||||
class DistributionStart(Subcommand):
|
||||
|
@ -48,9 +48,9 @@ class DistributionStart(Subcommand):
|
|||
)
|
||||
|
||||
def _run_distribution_start_cmd(self, args: argparse.Namespace) -> None:
|
||||
from llama_toolchain.common.exec import run_command
|
||||
from llama_toolchain.distribution.registry import resolve_distribution
|
||||
from llama_toolchain.distribution.server import main as distribution_server_init
|
||||
from .utils import run_command
|
||||
|
||||
dist = resolve_distribution(args.name)
|
||||
if dist is None:
|
||||
|
@ -67,6 +67,7 @@ class DistributionStart(Subcommand):
|
|||
config = yaml.safe_load(fp)
|
||||
|
||||
conda_env = config["conda_env"]
|
||||
|
||||
python_exe = run_command(shlex.split("which python"))
|
||||
# simple check, unfortunate
|
||||
if conda_env not in python_exe:
|
||||
|
@ -80,8 +81,3 @@ class DistributionStart(Subcommand):
|
|||
args.port,
|
||||
disable_ipv6=args.disable_ipv6,
|
||||
)
|
||||
# run_with_pty(
|
||||
# shlex.split(
|
||||
# f"conda run -n {conda_env} python -m llama_toolchain.distribution.server {dist.name} {config_yaml} --port 5000"
|
||||
# )
|
||||
# )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue