mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-23 06:22:23 +00:00
e19d7226f8
* feat: add model descriptions and usage * remove default model gallery * models: add embeddings and tts * docs: update table * docs: updates * images: cleanup pip cache after install * images: always run apt-get clean * ux: improve gRPC connection errors * ux: improve some messages * fix: fix coqui when no AudioPath is passed by * embedded: add more models * Add usage * Reorder table
24 lines
527 B
Bash
24 lines
527 B
Bash
#!/bin/bash
|
|
set -ex
|
|
|
|
# Check if environment exist
|
|
conda_env_exists(){
|
|
! conda list --name "${@}" >/dev/null 2>/dev/null
|
|
}
|
|
|
|
if conda_env_exists "transformers" ; then
|
|
echo "Creating virtual environment..."
|
|
conda env create --name transformers --file $1
|
|
echo "Virtual environment created."
|
|
else
|
|
echo "Virtual environment already exists."
|
|
fi
|
|
|
|
if [ "$PIP_CACHE_PURGE" = true ] ; then
|
|
export PATH=$PATH:/opt/conda/bin
|
|
|
|
# Activate conda environment
|
|
source activate transformers
|
|
|
|
pip cache purge
|
|
fi |