Skip to content

fix(vall-e-x): correctly install reqs in environment #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
PATH=$PATH:/opt/conda/bin make -C backend/python/petals \
; fi

# Copy VALLE-X as it's not a real "lib"
# TODO: this is wrong - we should copy the lib into the conda env path
RUN if [ -d /usr/lib/vall-e-x ]; then \
cp -rfv /usr/lib/vall-e-x/* ./ ; \
fi

# we also copy exllama libs over to resolve exllama import error
# TODO: check if this is still needed
RUN if [ -d /usr/local/lib/python3.9/dist-packages/exllama ]; then \
Expand Down
1 change: 1 addition & 0 deletions backend/python/vall-e-x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ttsvalle:
@echo "Creating virtual environment..."
@conda env create --name ttsvalle --file ttsvalle.yml
@echo "Virtual environment created."
bash install.sh

.PHONY: run
run:
Expand Down
14 changes: 14 additions & 0 deletions backend/python/vall-e-x/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

##
## A bash script installs the required dependencies of VALL-E-X and prepares the environment
export PATH=$PATH:/opt/conda/bin

# Activate conda environment
source activate ttsvalle

echo $CONDA_PREFIX

git clone https://github.com/Plachtaa/VALL-E-X.git $CONDA_PREFIX/vall-e-x && pushd $CONDA_PREFIX/vall-e-x && pip install -r requirements.txt && popd

cp -rfv $CONDA_PREFIX/vall-e-x/* ./
2 changes: 1 addition & 1 deletion backend/python/vall-e-x/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ source activate ttsvalle
# get the directory where the bash script is located
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

python $DIR/ttvalle.py $@
python $DIR/ttsvalle.py $@
10 changes: 10 additions & 0 deletions docs/content/advanced/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,13 @@ docker run --env REBUILD=true localai
# Option 2: set within an env file
docker run --env-file .env localai
```

### Build only a single backend

You can control the backends that are built by setting the `GRPC_BACKENDS` environment variable. For instance, to build only the `llama-cpp` backend only:

```bash
make GRPC_BACKENDS=backend-assets/grpc/llama-cpp build
```

By default, all the backends are built.