forked from phoenix-oss/llama-stack-mirror
Fix running stack built with base conda environment (#903)
Fixes: #902 For the test verified that llama stack can run if built: * With default "base" conda environment * With new custom conda environment using `--image-name XXX` option In both cases llama stack starts fine (was failing with "base") before this patch. CC: @ashwinb Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
This commit is contained in:
parent
39c34dd25f
commit
80f2032485
1 changed files with 4 additions and 0 deletions
|
@ -140,6 +140,10 @@ class StackRun(Subcommand):
|
|||
return
|
||||
|
||||
def get_conda_prefix(env_name):
|
||||
# Conda "base" environment does not end with "base" in the
|
||||
# prefix, so should be handled separately.
|
||||
if env_name == "base":
|
||||
return os.environ.get("CONDA_PREFIX")
|
||||
# Get conda environments info
|
||||
conda_env_info = json.loads(
|
||||
subprocess.check_output(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue