mirror of
https://github.com/mudler/LocalAI.git
synced 2025-01-18 02:40:01 +00:00
fix(python): move accelerate and GPU-specific libs to build-type (#3194)
Some of the dependencies in `requirements.txt`, even if generic, pulls down the line CUDA libraries. This changes moves mostly all GPU-specific libs to the build-type, and tries a safer approach. In `requirements.txt` now are listed only "first-level" dependencies, for instance, grpc, but libs-dependencies are moved down to the respective build-type `requirements.txt` to avoid any mixin. This should fix #2737 and #1592. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
abcf0ff000
commit
61b5602111
4
backend/python/bark/requirements-cpu.txt
Normal file
4
backend/python/bark/requirements-cpu.txt
Normal file
@ -0,0 +1,4 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,2 +1,4 @@
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -3,4 +3,6 @@ intel-extension-for-pytorch
|
||||
torch
|
||||
torchaudio
|
||||
optimum[openvino]
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
transformers
|
||||
accelerate
|
@ -1,6 +1,4 @@
|
||||
accelerate
|
||||
bark==0.1.5
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
3
backend/python/coqui/requirements-cpu.txt
Normal file
3
backend/python/coqui/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,2 +1,4 @@
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -3,4 +3,6 @@ intel-extension-for-pytorch
|
||||
torch
|
||||
torchaudio
|
||||
optimum[openvino]
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
transformers
|
||||
accelerate
|
@ -1,6 +1,4 @@
|
||||
accelerate
|
||||
TTS==0.22.0
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
8
backend/python/diffusers/requirements-cpu.txt
Normal file
8
backend/python/diffusers/requirements-cpu.txt
Normal file
@ -0,0 +1,8 @@
|
||||
diffusers
|
||||
opencv-python
|
||||
transformers
|
||||
accelerate
|
||||
compel
|
||||
peft
|
||||
sentencepiece
|
||||
torch
|
@ -1,2 +1,9 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
diffusers
|
||||
opencv-python
|
||||
transformers
|
||||
accelerate
|
||||
compel
|
||||
peft
|
||||
sentencepiece
|
@ -1 +1,8 @@
|
||||
torch
|
||||
diffusers
|
||||
opencv-python
|
||||
transformers
|
||||
accelerate
|
||||
compel
|
||||
peft
|
||||
sentencepiece
|
@ -1,3 +1,10 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torchvision
|
||||
torchvision
|
||||
diffusers
|
||||
opencv-python
|
||||
transformers
|
||||
accelerate
|
||||
compel
|
||||
peft
|
||||
sentencepiece
|
@ -3,4 +3,11 @@ intel-extension-for-pytorch
|
||||
torch
|
||||
torchvision
|
||||
optimum[openvino]
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
diffusers
|
||||
opencv-python
|
||||
transformers
|
||||
accelerate
|
||||
compel
|
||||
peft
|
||||
sentencepiece
|
3
backend/python/exllama/requirements-cpu.txt
Normal file
3
backend/python/exllama/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,2 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
@ -1 +1,3 @@
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
@ -1,5 +1,4 @@
|
||||
grpcio==1.65.0
|
||||
protobuf
|
||||
transformers
|
||||
certifi
|
||||
setuptools
|
3
backend/python/exllama2/requirements-cpu.txt
Normal file
3
backend/python/exllama2/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,2 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
@ -1 +1,3 @@
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
@ -1,4 +1,3 @@
|
||||
accelerate
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
|
@ -1 +1,2 @@
|
||||
torch
|
||||
torch
|
||||
transformers
|
@ -1,2 +1,3 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
torch
|
||||
transformers
|
@ -1 +1,2 @@
|
||||
torch
|
||||
torch
|
||||
transformers
|
@ -1,4 +1,3 @@
|
||||
grpcio==1.65.1
|
||||
protobuf
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
1
backend/python/openvoice/requirements-cpu.txt
Normal file
1
backend/python/openvoice/requirements-cpu.txt
Normal file
@ -0,0 +1 @@
|
||||
torch
|
3
backend/python/parler-tts/requirements-cpu.txt
Normal file
3
backend/python/parler-tts/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,2 +1,4 @@
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torchaudio
|
||||
torchaudio
|
||||
transformers
|
||||
accelerate
|
@ -3,4 +3,6 @@ intel-extension-for-pytorch
|
||||
torch
|
||||
torchaudio
|
||||
optimum[openvino]
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
transformers
|
||||
accelerate
|
@ -1,6 +1,4 @@
|
||||
accelerate
|
||||
grpcio==1.65.1
|
||||
protobuf
|
||||
git+https://github.com/huggingface/parler-tts.git@10016fb0300c0dc31a0fb70e26f3affee7b62f16
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
3
backend/python/petals/requirements-cpu.txt
Normal file
3
backend/python/petals/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,2 +1,3 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
transformers
|
||||
|
@ -1 +1,2 @@
|
||||
torch
|
||||
transformers
|
||||
|
@ -1,2 +1,3 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
transformers
|
||||
|
@ -2,4 +2,5 @@
|
||||
intel-extension-for-pytorch
|
||||
torch
|
||||
optimum[openvino]
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
transformers
|
@ -1,3 +1,2 @@
|
||||
git+https://github.com/bigscience-workshop/petals
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
4
backend/python/rerankers/requirements-cpu.txt
Normal file
4
backend/python/rerankers/requirements-cpu.txt
Normal file
@ -0,0 +1,4 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
rerankers[transformers]
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
rerankers[transformers]
|
@ -1 +1,4 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
rerankers[transformers]
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
rerankers[transformers]
|
@ -1,5 +1,8 @@
|
||||
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
|
||||
intel-extension-for-pytorch
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
rerankers[transformers]
|
||||
optimum[openvino]
|
||||
setuptools==72.1.0 # https://github.com/mudler/LocalAI/issues/2406
|
@ -1,6 +1,3 @@
|
||||
accelerate
|
||||
rerankers[transformers]
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
transformers
|
||||
certifi
|
6
backend/python/sentencetransformers/requirements-cpu.txt
Normal file
6
backend/python/sentencetransformers/requirements-cpu.txt
Normal file
@ -0,0 +1,6 @@
|
||||
torch
|
||||
accelerate
|
||||
transformers
|
||||
bitsandbytes
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
accelerate
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
@ -1 +1,4 @@
|
||||
torch
|
||||
accelerate
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torch
|
||||
accelerate
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
@ -2,4 +2,7 @@
|
||||
intel-extension-for-pytorch
|
||||
torch
|
||||
optimum[openvino]
|
||||
setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406
|
||||
accelerate
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
@ -1,6 +1,3 @@
|
||||
accelerate
|
||||
sentence-transformers==3.0.1
|
||||
transformers
|
||||
grpcio==1.65.1
|
||||
protobuf
|
||||
certifi
|
@ -0,0 +1,3 @@
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,2 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1 +1,3 @@
|
||||
torch
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,2 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
@ -1,5 +1,7 @@
|
||||
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
|
||||
intel-extension-for-pytorch
|
||||
transformers
|
||||
accelerate
|
||||
torch
|
||||
optimum[openvino]
|
||||
setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406
|
@ -1,5 +1,3 @@
|
||||
accelerate
|
||||
transformers
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
scipy==1.14.0
|
||||
|
4
backend/python/transformers/requirements-cpu.txt
Normal file
4
backend/python/transformers/requirements-cpu.txt
Normal file
@ -0,0 +1,4 @@
|
||||
torch
|
||||
accelerate
|
||||
transformers
|
||||
bitsandbytes
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
torch
|
||||
accelerate
|
||||
transformers
|
||||
bitsandbytes
|
@ -1 +1,4 @@
|
||||
torch
|
||||
accelerate
|
||||
transformers
|
||||
bitsandbytes
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
torch
|
||||
accelerate
|
||||
transformers
|
||||
bitsandbytes
|
@ -2,3 +2,5 @@
|
||||
intel-extension-for-pytorch
|
||||
torch
|
||||
optimum[openvino]
|
||||
intel-extension-for-transformers
|
||||
bitsandbytes
|
@ -1,8 +1,4 @@
|
||||
accelerate
|
||||
transformers
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
intel-extension-for-transformers
|
||||
bitsandbytes
|
||||
setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==69.5.1 # https://github.com/mudler/LocalAI/issues/2406
|
3
backend/python/vall-e-x/requirements-cpu.txt
Normal file
3
backend/python/vall-e-x/requirements-cpu.txt
Normal file
@ -0,0 +1,3 @@
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
@ -1,3 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
@ -1,2 +1,3 @@
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
@ -1,3 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
@ -1,5 +1,6 @@
|
||||
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
|
||||
intel-extension-for-pytorch
|
||||
accelerate
|
||||
torch
|
||||
torchaudio
|
||||
optimum[openvino]
|
||||
|
@ -1,4 +1,3 @@
|
||||
accelerate
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
1
backend/python/vllm/requirements-after.txt
Normal file
1
backend/python/vllm/requirements-after.txt
Normal file
@ -0,0 +1 @@
|
||||
flash-attn
|
4
backend/python/vllm/requirements-cpu.txt
Normal file
4
backend/python/vllm/requirements-cpu.txt
Normal file
@ -0,0 +1,4 @@
|
||||
accelerate
|
||||
torch
|
||||
transformers
|
||||
vllm
|
@ -1,3 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/cu118
|
||||
accelerate
|
||||
torch
|
||||
flash-attn
|
||||
transformers
|
||||
vllm
|
@ -1,2 +1,4 @@
|
||||
accelerate
|
||||
torch
|
||||
flash-attn
|
||||
transformers
|
||||
vllm
|
@ -1,2 +1,5 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm6.0
|
||||
torch
|
||||
accelerate
|
||||
torch
|
||||
transformers
|
||||
vllm
|
@ -1,5 +1,8 @@
|
||||
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
|
||||
intel-extension-for-pytorch
|
||||
accelerate
|
||||
torch
|
||||
transformers
|
||||
optimum[openvino]
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
setuptools==70.3.0 # https://github.com/mudler/LocalAI/issues/2406
|
||||
vllm
|
@ -1,7 +1,4 @@
|
||||
accelerate
|
||||
vllm
|
||||
grpcio==1.65.4
|
||||
protobuf
|
||||
certifi
|
||||
transformers
|
||||
setuptools
|
Loading…
Reference in New Issue
Block a user