mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-06 02:45:00 +00:00
feat(parler-tts): add parler conda env
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
c0ab23cb4f
commit
f41b7e1feb
9 changed files with 130 additions and 9 deletions
31
backend/python/parler-tts/install.sh
Executable file
31
backend/python/parler-tts/install.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
SKIP_CONDA=${SKIP_CONDA:-0}
|
||||
|
||||
# Check if environment exist
|
||||
conda_env_exists(){
|
||||
! conda list --name "${@}" >/dev/null 2>/dev/null
|
||||
}
|
||||
|
||||
if [ $SKIP_CONDA -eq 1 ]; then
|
||||
echo "Skipping conda environment installation"
|
||||
else
|
||||
export PATH=$PATH:/opt/conda/bin
|
||||
if conda_env_exists "parler" ; then
|
||||
echo "Creating virtual environment..."
|
||||
conda env create --name parler --file $1
|
||||
echo "Virtual environment created."
|
||||
else
|
||||
echo "Virtual environment already exists."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$PIP_CACHE_PURGE" = true ] ; then
|
||||
if [ $SKIP_CONDA -ne 1 ]; then
|
||||
# Activate conda environment
|
||||
source activate parler
|
||||
fi
|
||||
|
||||
pip cache purge
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue