llama-stack/llama_stack/cli
Sébastien Han 21e39633d8
feat(server): Use system packages for execution (#1252)
# What does this PR do?

Users prefer to rely on the main CLI rather than invoking the server
through a Python module. Users interact with a high-level CLI rather
than needing to know internal module structures.

Now, when running llama stack run <path-to-config>, the server will
attempt to use the system package or a virtual environment if one is
active.

This also eliminates the current process dependency chain when running
from a virtual environment:

-> llama stack run
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -> start_env.sh

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-> python -m server...

Signed-off-by: Sébastien Han <seb@redhat.com>

[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan

Run:

```
ollama run llama3.2:3b-instruct-fp16 --keepalive=2m &
llama stack run ./llama_stack/templates/ollama/run.yaml --disable-ipv6
```

Notice that the server starts and shutdowns normally.

[//]: # (## Documentation)

---------

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
2025-03-10 16:01:03 -07:00
..
model fix(cli): llama model prompt-format (#1481) 2025-03-07 11:45:54 -08:00
scripts API Updates (#73) 2024-09-17 19:51:35 -07:00
stack feat(server): Use system packages for execution (#1252) 2025-03-10 16:01:03 -07:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
download.py chore: update download error message (#1217) 2025-02-25 21:38:10 -08:00
llama.py fix: Incorrect import path for print_subcommand_description() (#1315) 2025-02-27 18:50:41 -08:00
subcommand.py API Updates (#73) 2024-09-17 19:51:35 -07:00
table.py style: remove prints in codebase (#1146) 2025-02-18 19:41:37 -08:00
verify_download.py style: update verify-download help text (#1134) 2025-02-18 10:15:26 -08:00