Skip to content

Commit

Permalink
fix: ensure correct version of torch is always installed based on BUI…
Browse files Browse the repository at this point in the history
…LD_TYPE(#2890)

* fix: ensure correct version of torch is always installed based on BUILD_TYPE

Signed-off-by: Chris Jowett <[email protected]>

* Move causal-conv1d installation to build_types

Signed-off-by: mudler <[email protected]>

* Move mamba-ssd install to build-type requirements.txt

Signed-off-by: mudler <[email protected]>

---------

Signed-off-by: Chris Jowett <[email protected]>
Signed-off-by: mudler <[email protected]>
Co-authored-by: Ettore Di Giacinto <[email protected]>
Co-authored-by: mudler <[email protected]>
  • Loading branch information
3 people authored Aug 5, 2024
1 parent f15a93b commit ed322bf
Show file tree
Hide file tree
Showing 44 changed files with 68 additions and 11 deletions.
2 changes: 2 additions & 0 deletions backend/python/autogptq/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/autogptq/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/autogptq/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ accelerate
auto-gptq==0.7.1
grpcio==1.65.1
protobuf
torch
certifi
transformers
3 changes: 3 additions & 0 deletions backend/python/bark/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
torchaudio
2 changes: 2 additions & 0 deletions backend/python/bark/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
torch
torchaudio
7 changes: 7 additions & 0 deletions backend/python/common/libbackend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ function installRequirements() {
requirementFiles+=("${MY_DIR}/requirements-${BUILD_PROFILE}.txt")
fi

# if BUILD_TYPE is empty, we are a CPU build, so we should try to install the CPU requirements
if [ "x${BUILD_TYPE}" == "x" ]; then
requirementFiles+=("${MY_DIR}/requirements-cpu.txt")
fi

requirementFiles+=("${MY_DIR}/requirements-after.txt")

for reqFile in ${requirementFiles[@]}; do
if [ -f ${reqFile} ]; then
echo "starting requirements install for ${reqFile}"
Expand Down
3 changes: 3 additions & 0 deletions backend/python/coqui/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
torchaudio
2 changes: 2 additions & 0 deletions backend/python/coqui/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
torch
torchaudio
2 changes: 2 additions & 0 deletions backend/python/diffusers/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/diffusers/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/diffusers/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ opencv-python
pillow
protobuf
sentencepiece
torch
transformers
certifi
2 changes: 2 additions & 0 deletions backend/python/exllama/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/exllama/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/exllama/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
grpcio==1.65.0
protobuf
torch
transformers
certifi
setuptools
2 changes: 2 additions & 0 deletions backend/python/exllama2/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/exllama2/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/exllama2/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ accelerate
grpcio==1.65.1
protobuf
certifi
torch
wheel
setuptools
2 changes: 2 additions & 0 deletions backend/python/mamba/requirements-after.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
causal-conv1d==1.4.0
mamba-ssm==2.2.2
1 change: 1 addition & 0 deletions backend/python/mamba/requirements-cpu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
2 changes: 2 additions & 0 deletions backend/python/mamba/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/mamba/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
3 changes: 1 addition & 2 deletions backend/python/mamba/requirements-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
# https://github.com/Dao-AILab/causal-conv1d/issues/24
packaging
setuptools
wheel
torch==2.3.1
wheel
2 changes: 0 additions & 2 deletions backend/python/mamba/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
causal-conv1d==1.4.0
mamba-ssm==2.2.2
grpcio==1.65.1
protobuf
certifi
Expand Down
2 changes: 2 additions & 0 deletions backend/python/openvoice/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/openvoice/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
3 changes: 3 additions & 0 deletions backend/python/parler-tts/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
torchaudio
2 changes: 2 additions & 0 deletions backend/python/parler-tts/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
torch
torchaudio
1 change: 0 additions & 1 deletion backend/python/parler-tts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
accelerate
grpcio==1.65.1
protobuf
torch
git+https://github.com/huggingface/parler-tts.git@10016fb0300c0dc31a0fb70e26f3affee7b62f16
certifi
transformers
2 changes: 2 additions & 0 deletions backend/python/petals/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/petals/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
2 changes: 2 additions & 0 deletions backend/python/rerankers/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/rerankers/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
2 changes: 2 additions & 0 deletions backend/python/sentencetransformers/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/transformers-musicgen/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ accelerate
transformers
grpcio==1.65.1
protobuf
torch
scipy==1.14.0
certifi
2 changes: 2 additions & 0 deletions backend/python/transformers/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
1 change: 1 addition & 0 deletions backend/python/transformers/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
torch
1 change: 0 additions & 1 deletion backend/python/transformers/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ accelerate
transformers
grpcio==1.65.1
protobuf
torch
certifi
intel-extension-for-transformers
bitsandbytes
Expand Down
3 changes: 3 additions & 0 deletions backend/python/vall-e-x/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
torchaudio
2 changes: 2 additions & 0 deletions backend/python/vall-e-x/requirements-cublas12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
torch
torchaudio
3 changes: 3 additions & 0 deletions backend/python/vllm/requirements-cublas11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch
flash-attn
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
torch
flash-attn

0 comments on commit ed322bf

Please sign in to comment.