forked from phoenix-oss/llama-stack-mirror
fix: check conda env name using basepath in exec.py (#1301)
# What does this PR do? check conda env name using basepath in exec.py The current logic for finding conda prefix does a `endswith` check with just the conda env name, but this will cause us to match incorrect if there is a different conda env which ends with same suffix. In my case, i had stack and llama-stack as the two conda envs. ## Test Plan llama stack run ~/.llama/distributions/fireworks/fireworks-run.yaml
This commit is contained in:
parent
8efa53daf1
commit
7f9b767277
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ def formulate_run_args(image_type, image_name, config, template_name) -> list:
|
|||
conda_env_info = json.loads(subprocess.check_output(["conda", "info", "--envs", "--json"]).decode())
|
||||
envs = conda_env_info["envs"]
|
||||
for envpath in envs:
|
||||
if envpath.endswith(env_name):
|
||||
if os.path.basename(envpath) == env_name:
|
||||
return envpath
|
||||
return None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue