Skip to content

Commit 2d64d8b

Browse files
authored
fix/docs: Python backend dependencies (#1360)
* Update docs for new requirements.txt path Signed-off-by: Marcus Köhler <[email protected]> * Fix typo (.PONY -> .PHONY) in python backend makefiles Signed-off-by: Marcus Köhler <[email protected]> --------- Signed-off-by: Marcus Köhler <[email protected]>
1 parent 9b98be1 commit 2d64d8b

File tree

10 files changed

+30
-27
lines changed

10 files changed

+30
-27
lines changed

backend/python/autogptq/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PONY: autogptq
1+
.PHONY: autogptq
22
autogptq:
33
@echo "Creating virtual environment..."
44
@conda env create --name autogptq --file autogptq.yml

backend/python/bark/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.PONY: ttsbark
1+
.PHONY: ttsbark
22
ttsbark:
33
@echo "Creating virtual environment..."
44
@conda env create --name ttsbark --file ttsbark.yml
5-
@echo "Virtual environment created."
5+
@echo "Virtual environment created."

backend/python/diffusers/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PONY: diffusers
1+
.PHONY: diffusers
22
diffusers:
33
@echo "Creating virtual environment..."
44
@conda env create --name diffusers --file diffusers.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running diffusers..."
1010
bash run.sh
11-
@echo "Diffusers run."
11+
@echo "Diffusers run."

backend/python/exllama/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PONY: exllama
1+
.PHONY: exllama
22
exllama:
33
@echo "Creating virtual environment..."
44
@conda env create --name exllama --file exllama.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running exllama..."
1010
bash run.sh
11-
@echo "exllama run."
11+
@echo "exllama run."

backend/python/petals/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PONY: petals
1+
.PHONY: petals
22
petals:
33
@echo "Creating virtual environment..."
44
@conda env create --name petals --file petals.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running petals..."
1010
bash run.sh
11-
@echo "petals run."
11+
@echo "petals run."
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
.PONY: sentencetransformers
1+
.PHONY: sentencetransformers
22
sentencetransformers:
33
@echo "Creating virtual environment..."
44
@conda env create --name sentencetransformers --file sentencetransformers.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running sentencetransformers..."
1010
bash run.sh
1111
@echo "sentencetransformers run."
1212

1313
# It is not working well by using command line. It only6 works with IDE like VSCode.
14-
.PONY: test
14+
.PHONY: test
1515
test:
1616
@echo "Testing sentencetransformers..."
1717
bash test.sh
18-
@echo "sentencetransformers tested."
18+
@echo "sentencetransformers tested."

backend/python/transformers/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
.PONY: transformers
1+
.PHONY: transformers
22
transformers:
33
@echo "Creating virtual environment..."
44
@conda env create --name transformers --file transformers.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running transformers..."
1010
bash run.sh
1111
@echo "transformers run."
1212

1313
# It is not working well by using command line. It only6 works with IDE like VSCode.
14-
.PONY: test
14+
.PHONY: test
1515
test:
1616
@echo "Testing transformers..."
1717
bash test.sh
18-
@echo "transformers tested."
18+
@echo "transformers tested."

backend/python/vall-e-x/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PONY: ttsvalle
1+
.PHONY: ttsvalle
22
ttsvalle:
33
@echo "Creating virtual environment..."
44
@conda env create --name ttsvalle --file ttsvalle.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running ttsvalle..."
1010
bash run.sh
11-
@echo "ttsvalle run."
11+
@echo "ttsvalle run."

backend/python/vllm/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PONY: vllm
1+
.PHONY: vllm
22
vllm:
33
@echo "Creating virtual environment..."
44
@conda env create --name vllm --file vllm.yml
55
@echo "Virtual environment created."
66

7-
.PONY: run
7+
.PHONY: run
88
run:
99
@echo "Running vllm..."
1010
bash run.sh
11-
@echo "vllm run."
11+
@echo "vllm run."

docs/content/features/embeddings.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ The `sentencetransformers` backend uses Python [sentence-transformers](https://g
7575

7676
{{% notice note %}}
7777

78-
- The `sentencetransformers` backend is an optional backend of LocalAI and uses Python. If you are running `LocalAI` from the containers you are good to go and should be already configured for use. If you are running `LocalAI` manually you must install the python dependencies (`pip install -r /path/to/LocalAI/extra/requirements`) and specify the extra backend in the `EXTERNAL_GRPC_BACKENDS` environment variable ( `EXTERNAL_GRPC_BACKENDS="sentencetransformers:/path/to/LocalAI/backend/python/sentencetransformers/sentencetransformers.py"` ) .
78+
- The `sentencetransformers` backend is an optional backend of LocalAI and uses Python. If you are running `LocalAI` from the containers you are good to go and should be already configured for use.
79+
- If you are running `LocalAI` manually you must install the python dependencies (`make prepare-extra-conda-environments`). This requires `conda` to be installed.
80+
- For local execution, you also have to specify the extra backend in the `EXTERNAL_GRPC_BACKENDS` environment variable.
81+
- Example: `EXTERNAL_GRPC_BACKENDS="sentencetransformers:/path/to/LocalAI/backend/python/sentencetransformers/sentencetransformers.py"`
7982
- The `sentencetransformers` backend does support only embeddings of text, and not of tokens. If you need to embed tokens you can use the `bert` backend or `llama.cpp`.
8083
- No models are required to be downloaded before using the `sentencetransformers` backend. The models will be downloaded automatically the first time the API is used.
8184

0 commit comments

Comments
 (0)