llama-stack/llama_stack/providers/inline
Ashwin Bharambe cee3816609
Make llama stack build not create a new conda by default (#788)
## What does this PR do?

So far `llama stack build` has always created a separate conda
environment for packaging the dependencies of a distribution. The main
reason to do so is isolation -- distributions are composed of providers
which can have a variety of potentially conflicting dependencies. That
said, this has created significant annoyance for new users since it is
not at all transparent. The fact that `llama stack run` is actually
running the code in some other conda is very surprising.

This PR tries to make things better. 

- Both `llama stack build` and `llama stack run` now accept an
`--image-name` argument which represents the (conda, docker, virtualenv)
image you want to operate upon.
- For the default (conda) mode, the script checks if a current conda
environment exists. If one exists, it uses it.
- If `--image-name` is provided, that option is used. In this case, an
environment is created if needed.
- There is no automatic `llamastack-` prefixing of the environment names
done anymore.


## Test Plan

Start in a conda environment, run `llama stack build --template
fireworks`; verify that it successfully built into the current
environment and stored the build file at
`$CONDA_PREFIX/llamastack-build.yaml`. Run `llama stack run fireworks`
which started correctly in the current environment.

Ran the same build command outside of conda. It failed asking for
`--image-name`. Ran it with `llama stack build --template fireworks
--image-name foo`. This successfully created a conda environment called
`foo` and installed deps. Ran `llama stack run fireworks` outside conda
which failed. Activated a different conda, ran again, it failed saying
it did not find the `llamastack-build.yaml` file. Then used
`--image-name foo` option and it ran successfully.
2025-01-16 13:44:53 -08:00
..
agents More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
datasetio Add persistence for localfs datasets (#557) 2025-01-09 17:34:18 -08:00
eval rebase eval test w/ tool_runtime fixtures (#773) 2025-01-15 12:55:19 -08:00
inference Make llama stack build not create a new conda by default (#788) 2025-01-16 13:44:53 -08:00
ios/inference impls -> inline, adapters -> remote (#381) 2024-11-06 14:54:05 -08:00
memory [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
post_training More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
safety [bugfix] fix llama guard parsing ContentDelta (#772) 2025-01-15 11:20:23 -08:00
scoring Add X-LlamaStack-Client-Version, rename ProviderData -> Provider-Data (#735) 2025-01-09 11:51:36 -08:00
telemetry Idiomatic REST API: Telemetry (#786) 2025-01-16 12:08:46 -08:00
tool_runtime agents to use tools api (#673) 2025-01-08 19:01:00 -08:00
__init__.py impls -> inline, adapters -> remote (#381) 2024-11-06 14:54:05 -08:00