mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
parent
d74501f75c
commit
b9b1e8b08b
2 changed files with 19 additions and 16 deletions
|
@ -39,7 +39,9 @@ class StackConfigure(Subcommand):
|
||||||
)
|
)
|
||||||
|
|
||||||
def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
|
def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
@ -65,18 +67,19 @@ class StackConfigure(Subcommand):
|
||||||
f"Could not find {build_config_file}. Trying conda build name instead...",
|
f"Could not find {build_config_file}. Trying conda build name instead...",
|
||||||
color="green",
|
color="green",
|
||||||
)
|
)
|
||||||
if os.getenv("CONDA_PREFIX", ""):
|
|
||||||
conda_dir = (
|
conda_dir = (
|
||||||
Path(os.getenv("CONDA_PREFIX")).parent / f"llamastack-{args.config}"
|
Path(os.path.expanduser("~/.conda/envs")) / f"llamastack-{args.config}"
|
||||||
)
|
)
|
||||||
else:
|
output = subprocess.check_output(
|
||||||
cprint(
|
["bash", "-c", "conda info --json -a | jq '.envs'"]
|
||||||
"Cannot find CONDA_PREFIX. Trying default conda path ~/.conda/envs...",
|
)
|
||||||
color="green",
|
conda_envs = json.loads(output.decode("utf-8"))
|
||||||
)
|
|
||||||
conda_dir = (
|
for x in conda_envs:
|
||||||
Path(os.path.expanduser("~/.conda/envs")) / f"llamastack-{args.config}"
|
if x.endswith(f"/llamastack-{args.config}"):
|
||||||
)
|
conda_dir = Path(x)
|
||||||
|
break
|
||||||
|
|
||||||
build_config_file = Path(conda_dir) / f"{args.config}-build.yaml"
|
build_config_file = Path(conda_dir) / f"{args.config}-build.yaml"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
built_at: '2024-09-23T00:54:40.551416'
|
built_at: '2024-09-23T00:54:40.551416'
|
||||||
image_name: test-2
|
image_name: local
|
||||||
docker_image: null
|
docker_image: null
|
||||||
conda_env: test-2
|
conda_env: local
|
||||||
apis_to_serve:
|
apis_to_serve:
|
||||||
- shields
|
- shields
|
||||||
- agents
|
- agents
|
||||||
|
@ -34,12 +34,12 @@ routing_table:
|
||||||
inference:
|
inference:
|
||||||
- provider_type: meta-reference
|
- provider_type: meta-reference
|
||||||
config:
|
config:
|
||||||
model: Meta-Llama3.1-8B-Instruct
|
model: Llama3.1-8B-Instruct
|
||||||
quantization: null
|
quantization: null
|
||||||
torch_seed: null
|
torch_seed: null
|
||||||
max_seq_len: 4096
|
max_seq_len: 4096
|
||||||
max_batch_size: 1
|
max_batch_size: 1
|
||||||
routing_key: Meta-Llama3.1-8B-Instruct
|
routing_key: Llama3.1-8B-Instruct
|
||||||
safety:
|
safety:
|
||||||
- provider_type: meta-reference
|
- provider_type: meta-reference
|
||||||
config:
|
config:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue