mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
allow installing from test.pypi.org
This commit is contained in:
parent
7b37ed5dae
commit
83adaae09b
1 changed files with 9 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
LLAMA_MODELS_DIR=${LLAMA_MODELS_DIR:-}
|
||||
LLAMA_TOOLCHAIN_DIR=${LLAMA_TOOLCHAIN_DIR:-}
|
||||
USE_TEST_PYPI=${USE_TEST_PYPI:-}
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
@ -56,6 +57,12 @@ ensure_conda_env_python310() {
|
|||
eval "$(conda shell.bash hook)"
|
||||
conda deactivate && conda activate "${env_name}"
|
||||
|
||||
PIP_ARGS=""
|
||||
if [ "$USE_TEST_PYPI" = "1" ]; then
|
||||
# these packages are damaged in test-pypi, so install them first
|
||||
pip install fastapi libcst
|
||||
PIP_ARGS="--extra-index-url https://test.pypi.org/simple/"
|
||||
fi
|
||||
# Re-installing llama-toolchain in the new conda environment
|
||||
if [ -n "$LLAMA_TOOLCHAIN_DIR" ]; then
|
||||
if [ ! -d "$LLAMA_TOOLCHAIN_DIR" ]; then
|
||||
|
@ -66,7 +73,7 @@ ensure_conda_env_python310() {
|
|||
echo "Installing from LLAMA_TOOLCHAIN_DIR: $LLAMA_TOOLCHAIN_DIR"
|
||||
pip install -e "$LLAMA_TOOLCHAIN_DIR"
|
||||
else
|
||||
pip install llama-toolchain
|
||||
pip install $PIP_ARGS llama-toolchain
|
||||
fi
|
||||
|
||||
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
||||
|
@ -83,7 +90,7 @@ ensure_conda_env_python310() {
|
|||
# Install pip dependencies
|
||||
if [ -n "$pip_dependencies" ]; then
|
||||
echo "Installing pip dependencies: $pip_dependencies"
|
||||
pip install $pip_dependencies
|
||||
pip install $PIP_ARGS $pip_dependencies
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue