Skip to content

Commit 5e155fb

Browse files
authored
fix(python): pin exllama2 (#1711)
fix(python): pin python deps Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 39a6b56 commit 5e155fb

File tree

6 files changed

+43
-11
lines changed

6 files changed

+43
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,4 +550,4 @@ docker-image-intel:
550550
--build-arg BASE_IMAGE=intel/oneapi-basekit:2024.0.1-devel-ubuntu22.04 \
551551
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
552552
--build-arg GO_TAGS="none" \
553-
--build-arg BUILD_TYPE=sycl_f16 -t $(DOCKER_IMAGE) .
553+
--build-arg BUILD_TYPE=sycl_f32 -t $(DOCKER_IMAGE) .

backend/python/diffusers/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
CONDA_ENV_PATH = "diffusers.yml"
2+
13
.PHONY: diffusers
24
diffusers:
3-
@echo "Creating virtual environment..."
4-
@conda env create --name diffusers --file diffusers.yml
5-
@echo "Virtual environment created."
5+
@echo "Installing $(CONDA_ENV_PATH)..."
6+
bash install.sh $(CONDA_ENV_PATH)
67

78
.PHONY: run
89
run:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Check if environment exist
5+
conda_env_exists(){
6+
! conda list --name "${@}" >/dev/null 2>/dev/null
7+
}
8+
9+
if conda_env_exists "diffusers" ; then
10+
echo "Creating virtual environment..."
11+
conda env create --name diffusers --file $1
12+
echo "Virtual environment created."
13+
else
14+
echo "Virtual environment already exists."
15+
fi
16+
17+
if [ "$PIP_CACHE_PURGE" = true ] ; then
18+
export PATH=$PATH:/opt/conda/bin
19+
20+
# Activate conda environment
21+
source activate diffusers
22+
23+
pip cache purge
24+
fi

backend/python/exllama2/install.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
#!/bin/bash
2-
2+
set -e
33
##
44
## A bash script installs the required dependencies of VALL-E-X and prepares the environment
55
export PATH=$PATH:/opt/conda/bin
6+
export SHA=c0ddebaaaf8ffd1b3529c2bb654e650bce2f790f
67

78
# Activate conda environment
89
source activate transformers
910

1011
echo $CONDA_PREFIX
1112

12-
git clone https://github.com/turboderp/exllamav2 $CONDA_PREFIX/exllamav2 && pushd $CONDA_PREFIX/exllamav2 && pip install -r requirements.txt && popd
13+
git clone https://github.com/turboderp/exllamav2 $CONDA_PREFIX/exllamav2
14+
15+
pushd $CONDA_PREFIX/exllamav2
16+
17+
git checkout -b build $SHA
18+
19+
# TODO: this needs to be pinned within the conda environments
20+
pip install -r requirements.txt
21+
22+
popd
1323

1424
cp -rfv $CONDA_PREFIX/exllamav2/* ./
1525

backend/python/mamba/install.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
2+
set -e
33
##
44
## A bash script installs the required dependencies of VALL-E-X and prepares the environment
55
export PATH=$PATH:/opt/conda/bin

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ source activate transformers
1010

1111
echo $CONDA_PREFIX
1212

13-
git clone https://github.com/Plachtaa/VALL-E-X.git $CONDA_PREFIX/vall-e-x && pushd $CONDA_PREFIX/vall-e-x && git checkout -b build $SHA && pip install -r requirements.txt && popd
14-
15-
# Pin some dependencies (the upstream requirements is too much loose)
16-
pip install torchaudio==2.2.0
13+
git clone https://github.com/Plachtaa/VALL-E-X.git $CONDA_PREFIX/vall-e-x && pushd $CONDA_PREFIX/vall-e-x && git checkout -b build $SHA && popd
1714

1815
cp -rfv $CONDA_PREFIX/vall-e-x/* ./
1916

0 commit comments

Comments
 (0)