mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-21 13:37:51 +00:00
0fdff26924
* feat(parler-tts): Add new backend
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(parler-tts): try downgrade protobuf
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(parler-tts): add parler conda env
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Revert "feat(parler-tts): try downgrade protobuf"
This reverts commit bd5941d5cfc00676b45a99f71debf3c34249cf3c.
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* deps: add grpc
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix: try to gen proto with same environment
* workaround
* Revert "fix: try to gen proto with same environment"
This reverts commit 998c745e2f
.
* Workaround fixup
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Dave <dave@gray101.com>
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/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 [ $SKIP_CONDA -ne 1 ]; then
|
|
# Activate conda environment
|
|
source activate parler
|
|
# https://github.com/descriptinc/audiotools/issues/101
|
|
# incompatible protobuf versions.
|
|
curl -L https://raw.githubusercontent.com/protocolbuffers/protobuf/main/python/google/protobuf/internal/builder.py -o $CONDA_PREFIX/lib/python3.11/site-packages/google/protobuf/internal/builder.py
|
|
fi
|
|
|
|
if [ "$PIP_CACHE_PURGE" = true ] ; then
|
|
if [ $SKIP_CONDA -ne 1 ]; then
|
|
# Activate conda environment
|
|
source activate parler
|
|
fi
|
|
|
|
pip cache purge
|
|
fi |