llama-stack/llama_stack/distribution
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
..
routers feat(logging): implement category-based logging (#1362) 2025-03-07 11:34:30 -08:00
server feat(server): Use system packages for execution (#1252) 2025-03-10 16:01:03 -07:00
store refactor: move a few tests to top-level tests/ directory 2025-03-03 17:33:39 -08:00
ui docs: update test_agents to use new Agent SDK API (#1402) 2025-03-06 15:21:12 -08:00
utils refactor: ImageType to LlamaStackImageType (#1500) 2025-03-10 17:12:53 -04:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
build.py refactor: ImageType to LlamaStackImageType (#1500) 2025-03-10 17:12:53 -04:00
build_conda_env.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
build_container.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
build_venv.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
client.py chore: move all Llama Stack types from llama-models to llama-stack (#1098) 2025-02-14 09:10:59 -08:00
common.sh fix: Fixing some small issues with the build scripts (#1132) 2025-02-19 22:20:49 -08:00
configure.py fix: resolve pydantic warning on .dict() usage (#1445) 2025-03-06 11:27:47 -08:00
datatypes.py fix!: update eval-tasks -> benchmarks (#1032) 2025-02-13 16:40:58 -08:00
distribution.py chore(lint): update Ruff ignores for project conventions and maintainability (#1184) 2025-02-28 09:36:49 -08:00
inspect.py fix: improve signal handling and update dependencies (#1044) 2025-02-13 08:07:59 -08:00
library_client.py fix(library_client): ensure pending asyncio tasks like generator athrow are executed 2025-03-09 16:17:27 -07:00
request_headers.py fix: Use re-entrancy and concurrency safe context managers for provider data (#1498) 2025-03-08 22:56:30 -08:00
resolver.py feat(logging): implement category-based logging (#1362) 2025-03-07 11:34:30 -08:00
stack.py feat(logging): implement category-based logging (#1362) 2025-03-07 11:34:30 -08:00
start_stack.sh feat(logging): implement category-based logging (#1362) 2025-03-07 11:34:30 -08:00