mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-13 05:17:26 +00:00
Two small but important fixes
This commit is contained in:
parent
fba1664cd1
commit
4683770f68
2 changed files with 6 additions and 2 deletions
|
@ -178,6 +178,12 @@ class StackRun(Subcommand):
|
||||||
# else must be venv since that is the only valid option left.
|
# else must be venv since that is the only valid option left.
|
||||||
current_venv = os.environ.get("VIRTUAL_ENV")
|
current_venv = os.environ.get("VIRTUAL_ENV")
|
||||||
venv = args.image_name or current_venv
|
venv = args.image_name or current_venv
|
||||||
|
if not venv:
|
||||||
|
cprint(
|
||||||
|
"No current virtual environment detected, please specify a virtual environment name with --image-name",
|
||||||
|
color="red",
|
||||||
|
)
|
||||||
|
return
|
||||||
script = importlib.resources.files("llama_stack") / "distribution/start_venv.sh"
|
script = importlib.resources.files("llama_stack") / "distribution/start_venv.sh"
|
||||||
run_args = [
|
run_args = [
|
||||||
script,
|
script,
|
||||||
|
@ -206,5 +212,4 @@ class StackRun(Subcommand):
|
||||||
|
|
||||||
if args.tls_keyfile and args.tls_certfile:
|
if args.tls_keyfile and args.tls_certfile:
|
||||||
run_args.extend(["--tls-keyfile", args.tls_keyfile, "--tls-certfile", args.tls_certfile])
|
run_args.extend(["--tls-keyfile", args.tls_keyfile, "--tls-certfile", args.tls_certfile])
|
||||||
|
|
||||||
run_with_pty(run_args)
|
run_with_pty(run_args)
|
||||||
|
|
|
@ -44,7 +44,6 @@ class SentenceTransformersInferenceImpl(
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async def register_model(self, model: Model) -> None:
|
async def register_model(self, model: Model) -> None:
|
||||||
_ = self._load_sentence_transformer_model(model.provider_resource_id)
|
|
||||||
return model
|
return model
|
||||||
|
|
||||||
async def unregister_model(self, model_id: str) -> None:
|
async def unregister_model(self, model_id: str) -> None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue