forked from phoenix-oss/llama-stack-mirror
Make build_conda_env a bit more robust
This commit is contained in:
parent
cd850c16de
commit
8d511cdf91
2 changed files with 8 additions and 8 deletions
|
@ -55,7 +55,7 @@ conda create -n stack python=3.10
|
||||||
conda activate stack
|
conda activate stack
|
||||||
|
|
||||||
cd llama-stack
|
cd llama-stack
|
||||||
pip install -e .
|
$CONDA_PREFIX/bin/pip install -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
## The Llama CLI
|
## The Llama CLI
|
||||||
|
|
|
@ -77,8 +77,8 @@ ensure_conda_env_python310() {
|
||||||
|
|
||||||
if [ -n "$TEST_PYPI_VERSION" ]; then
|
if [ -n "$TEST_PYPI_VERSION" ]; then
|
||||||
# these packages are damaged in test-pypi, so install them first
|
# these packages are damaged in test-pypi, so install them first
|
||||||
pip install fastapi libcst
|
$CONDA_PREFIX/bin/pip install fastapi libcst
|
||||||
pip install --extra-index-url https://test.pypi.org/simple/ llama-models==$TEST_PYPI_VERSION llama-stack==$TEST_PYPI_VERSION $pip_dependencies
|
$CONDA_PREFIX/bin/pip install --extra-index-url https://test.pypi.org/simple/ llama-models==$TEST_PYPI_VERSION llama-stack==$TEST_PYPI_VERSION $pip_dependencies
|
||||||
else
|
else
|
||||||
# Re-installing llama-stack in the new conda environment
|
# Re-installing llama-stack in the new conda environment
|
||||||
if [ -n "$LLAMA_STACK_DIR" ]; then
|
if [ -n "$LLAMA_STACK_DIR" ]; then
|
||||||
|
@ -88,9 +88,9 @@ ensure_conda_env_python310() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Installing from LLAMA_STACK_DIR: $LLAMA_STACK_DIR\n"
|
printf "Installing from LLAMA_STACK_DIR: $LLAMA_STACK_DIR\n"
|
||||||
pip install --no-cache-dir -e "$LLAMA_STACK_DIR"
|
$CONDA_PREFIX/bin/pip install --no-cache-dir -e "$LLAMA_STACK_DIR"
|
||||||
else
|
else
|
||||||
pip install --no-cache-dir llama-stack
|
$CONDA_PREFIX/bin/pip install --no-cache-dir llama-stack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
||||||
|
@ -100,14 +100,14 @@ ensure_conda_env_python310() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Installing from LLAMA_MODELS_DIR: $LLAMA_MODELS_DIR\n"
|
printf "Installing from LLAMA_MODELS_DIR: $LLAMA_MODELS_DIR\n"
|
||||||
pip uninstall -y llama-models
|
$CONDA_PREFIX/bin/pip uninstall -y llama-models
|
||||||
pip install --no-cache-dir -e "$LLAMA_MODELS_DIR"
|
$CONDA_PREFIX/bin/pip install --no-cache-dir -e "$LLAMA_MODELS_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install pip dependencies
|
# Install pip dependencies
|
||||||
if [ -n "$pip_dependencies" ]; then
|
if [ -n "$pip_dependencies" ]; then
|
||||||
printf "Installing pip dependencies: $pip_dependencies\n"
|
printf "Installing pip dependencies: $pip_dependencies\n"
|
||||||
pip install $pip_dependencies
|
$CONDA_PREFIX/bin/pip install $pip_dependencies
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue