Skip to content

Commit 238fec2

Browse files
authored
fix(vall-e-x): correctly install reqs in environment (#1377)
1 parent 3d71bc9 commit 238fec2

File tree

5 files changed

+26
-7
lines changed

5 files changed

+26
-7
lines changed

Dockerfile

-6
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
185185
PATH=$PATH:/opt/conda/bin make -C backend/python/petals \
186186
; fi
187187

188-
# Copy VALLE-X as it's not a real "lib"
189-
# TODO: this is wrong - we should copy the lib into the conda env path
190-
RUN if [ -d /usr/lib/vall-e-x ]; then \
191-
cp -rfv /usr/lib/vall-e-x/* ./ ; \
192-
fi
193-
194188
# we also copy exllama libs over to resolve exllama import error
195189
# TODO: check if this is still needed
196190
RUN if [ -d /usr/local/lib/python3.9/dist-packages/exllama ]; then \

backend/python/vall-e-x/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ttsvalle:
33
@echo "Creating virtual environment..."
44
@conda env create --name ttsvalle --file ttsvalle.yml
55
@echo "Virtual environment created."
6+
bash install.sh
67

78
.PHONY: run
89
run:

backend/python/vall-e-x/install.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
##
4+
## A bash script installs the required dependencies of VALL-E-X and prepares the environment
5+
export PATH=$PATH:/opt/conda/bin
6+
7+
# Activate conda environment
8+
source activate ttsvalle
9+
10+
echo $CONDA_PREFIX
11+
12+
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
13+
14+
cp -rfv $CONDA_PREFIX/vall-e-x/* ./

backend/python/vall-e-x/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ source activate ttsvalle
1010
# get the directory where the bash script is located
1111
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1212

13-
python $DIR/ttvalle.py $@
13+
python $DIR/ttsvalle.py $@

docs/content/advanced/_index.en.md

+10
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,13 @@ docker run --env REBUILD=true localai
354354
# Option 2: set within an env file
355355
docker run --env-file .env localai
356356
```
357+
358+
### Build only a single backend
359+
360+
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:
361+
362+
```bash
363+
make GRPC_BACKENDS=backend-assets/grpc/llama-cpp build
364+
```
365+
366+
By default, all the backends are built.

0 commit comments

Comments
 (0)