2023-04-15 23:39:07 +00:00
|
|
|
GOCMD=go
|
|
|
|
|
GOTEST=$(GOCMD) test
|
|
|
|
|
GOVET=$(GOCMD) vet
|
2023-04-19 16:43:10 +00:00
|
|
|
BINARY_NAME=local-ai
|
2023-05-04 10:26:59 +00:00
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
GORELEASER?=
|
2024-11-20 13:48:40 +00:00
|
|
|
|
2023-06-05 12:26:20 +00:00
|
|
|
export BUILD_TYPE?=
|
2025-07-20 20:52:45 +00:00
|
|
|
|
2023-05-16 17:32:53 +00:00
|
|
|
GO_TAGS?=
|
2024-05-10 14:01:55 +00:00
|
|
|
BUILD_ID?=
|
2024-11-18 12:59:06 +00:00
|
|
|
NATIVE?=false
|
2023-06-26 13:12:43 +00:00
|
|
|
|
2023-10-19 11:50:40 +00:00
|
|
|
TEST_DIR=/tmp/test
|
|
|
|
|
|
2024-03-01 15:19:53 +00:00
|
|
|
TEST_FLAKES?=5
|
|
|
|
|
|
2023-10-19 11:50:40 +00:00
|
|
|
RANDOM := $(shell bash -c 'echo $$RANDOM')
|
|
|
|
|
|
2023-07-02 09:14:09 +00:00
|
|
|
VERSION?=$(shell git describe --always --tags || echo "dev" )
|
2023-06-26 13:12:43 +00:00
|
|
|
# go tool nm ./local-ai | grep Commit
|
2024-07-22 13:39:57 +00:00
|
|
|
LD_FLAGS?=-s -w
|
2024-07-08 20:04:06 +00:00
|
|
|
override LD_FLAGS += -X "github.com/mudler/LocalAI/internal.Version=$(VERSION)"
|
|
|
|
|
override LD_FLAGS += -X "github.com/mudler/LocalAI/internal.Commit=$(shell git rev-parse HEAD)"
|
2023-06-26 13:12:43 +00:00
|
|
|
|
2023-05-16 17:32:53 +00:00
|
|
|
OPTIONAL_TARGETS?=
|
2023-05-03 09:45:22 +00:00
|
|
|
|
2024-06-26 12:58:38 +00:00
|
|
|
export OS := $(shell uname -s)
|
2023-05-23 15:12:48 +00:00
|
|
|
ARCH := $(shell uname -m)
|
2023-04-15 23:39:07 +00:00
|
|
|
GREEN := $(shell tput -Txterm setaf 2)
|
|
|
|
|
YELLOW := $(shell tput -Txterm setaf 3)
|
|
|
|
|
WHITE := $(shell tput -Txterm setaf 7)
|
|
|
|
|
CYAN := $(shell tput -Txterm setaf 6)
|
|
|
|
|
RESET := $(shell tput -Txterm sgr0)
|
|
|
|
|
|
2023-10-19 11:50:40 +00:00
|
|
|
# Default Docker bridge IP
|
|
|
|
|
E2E_BRIDGE_IP?=172.17.0.1
|
|
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
ifndef UNAME_S
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
|
endif
|
2024-11-20 13:48:40 +00:00
|
|
|
|
2023-11-30 18:50:50 +00:00
|
|
|
ifeq ($(OS),Darwin)
|
|
|
|
|
ifeq ($(OSX_SIGNING_IDENTITY),)
|
|
|
|
|
OSX_SIGNING_IDENTITY := $(shell security find-identity -v -p codesigning | grep '"' | head -n 1 | sed -E 's/.*"(.*)"/\1/')
|
|
|
|
|
endif
|
2023-05-24 14:42:24 +00:00
|
|
|
endif
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
# check if goreleaser exists
|
|
|
|
|
ifeq (, $(shell which goreleaser))
|
|
|
|
|
GORELEASER=curl -sfL https://goreleaser.com/static/run | bash -s --
|
|
|
|
|
else
|
|
|
|
|
GORELEASER=$(shell which goreleaser)
|
|
|
|
|
endif
|
2024-02-08 19:12:51 +00:00
|
|
|
|
2024-02-27 14:04:19 +00:00
|
|
|
TEST_PATHS?=./api/... ./pkg/... ./core/...
|
2023-10-21 09:34:59 +00:00
|
|
|
|
2024-01-19 14:38:43 +00:00
|
|
|
|
2025-07-20 20:52:45 +00:00
|
|
|
.PHONY: all test build vendor
|
2023-04-15 23:39:07 +00:00
|
|
|
|
|
|
|
|
all: help
|
|
|
|
|
|
2023-05-03 09:45:22 +00:00
|
|
|
## GENERIC
|
|
|
|
|
rebuild: ## Rebuilds the project
|
2023-07-05 16:24:55 +00:00
|
|
|
$(GOCMD) clean -cache
|
2023-04-29 18:38:37 +00:00
|
|
|
$(MAKE) build
|
|
|
|
|
|
2023-04-15 23:39:07 +00:00
|
|
|
clean: ## Remove build related file
|
2023-07-05 16:24:55 +00:00
|
|
|
$(GOCMD) clean -cache
|
2023-07-25 21:02:46 +00:00
|
|
|
rm -f prepare
|
2023-04-19 15:10:29 +00:00
|
|
|
rm -rf $(BINARY_NAME)
|
2023-05-23 15:12:48 +00:00
|
|
|
rm -rf release/
|
2024-04-13 07:37:32 +00:00
|
|
|
$(MAKE) protogen-clean
|
|
|
|
|
rmdir pkg/grpc/proto || true
|
2023-04-15 23:39:07 +00:00
|
|
|
|
2024-03-18 18:19:43 +00:00
|
|
|
clean-tests:
|
|
|
|
|
rm -rf test-models
|
|
|
|
|
rm -rf test-dir
|
2024-09-24 07:32:48 +00:00
|
|
|
|
2025-05-04 14:42:42 +00:00
|
|
|
## Install Go tools
|
|
|
|
|
install-go-tools:
|
|
|
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af
|
|
|
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
|
|
|
|
|
|
2023-05-03 09:45:22 +00:00
|
|
|
## Build:
|
2025-07-22 14:31:04 +00:00
|
|
|
build: protogen-go install-go-tools ## Build the project
|
2023-05-03 09:45:22 +00:00
|
|
|
$(info ${GREEN}I local-ai build info:${RESET})
|
|
|
|
|
$(info ${GREEN}I BUILD_TYPE: ${YELLOW}$(BUILD_TYPE)${RESET})
|
2023-05-16 17:32:53 +00:00
|
|
|
$(info ${GREEN}I GO_TAGS: ${YELLOW}$(GO_TAGS)${RESET})
|
2023-06-26 13:12:43 +00:00
|
|
|
$(info ${GREEN}I LD_FLAGS: ${YELLOW}$(LD_FLAGS)${RESET})
|
2024-07-22 13:39:57 +00:00
|
|
|
$(info ${GREEN}I UPX: ${YELLOW}$(UPX)${RESET})
|
2025-05-04 14:42:42 +00:00
|
|
|
rm -rf $(BINARY_NAME) || true
|
2023-07-14 23:19:43 +00:00
|
|
|
CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o $(BINARY_NAME) ./
|
2023-05-03 09:45:22 +00:00
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
dev-dist:
|
|
|
|
|
$(GORELEASER) build --snapshot --clean
|
2024-06-14 06:51:25 +00:00
|
|
|
|
2024-05-14 17:40:18 +00:00
|
|
|
dist:
|
2025-07-22 14:31:04 +00:00
|
|
|
$(GORELEASER) build --clean
|
2023-05-23 15:12:48 +00:00
|
|
|
|
2023-11-23 14:22:54 +00:00
|
|
|
osx-signed: build
|
|
|
|
|
codesign --deep --force --sign "$(OSX_SIGNING_IDENTITY)" --entitlements "./Entitlements.plist" "./$(BINARY_NAME)"
|
|
|
|
|
|
2023-05-03 09:45:22 +00:00
|
|
|
## Run
|
2025-07-20 20:52:45 +00:00
|
|
|
run: ## run local-ai
|
2023-07-14 23:19:43 +00:00
|
|
|
CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GOCMD) run ./
|
2023-04-15 23:39:07 +00:00
|
|
|
|
2024-03-18 18:19:43 +00:00
|
|
|
test-models/testmodel.ggml:
|
2023-04-21 22:44:52 +00:00
|
|
|
mkdir test-models
|
2023-05-12 08:04:20 +00:00
|
|
|
mkdir test-dir
|
2025-05-26 15:19:46 +00:00
|
|
|
wget -q https://huggingface.co/mradermacher/gpt2-alpaca-gpt4-GGUF/resolve/main/gpt2-alpaca-gpt4.Q4_K_M.gguf -O test-models/testmodel.ggml
|
feat(conda): conda environments (#1144)
* feat(autogptq): add a separate conda environment for autogptq (#1137)
**Description**
This PR related to #1117
**Notes for Reviewers**
Here we lock down the version of the dependencies. Make sure it can be
used all the time without failed if the version of dependencies were
upgraded.
I change the order of importing packages according to the pylint, and no
change the logic of code. It should be ok.
I will do more investigate on writing some test cases for every backend.
I can run the service in my environment, but there is not exist a way to
test it. So, I am not confident on it.
Add a README.md in the `grpc` root. This is the common commands for
creating `conda` environment. And it can be used to the reference file
for creating extral gRPC backend document.
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* [Extra backend] Add seperate environment for ttsbark (#1141)
**Description**
This PR relates to #1117
**Notes for Reviewers**
Same to the latest PR:
* The code is also changed, but only the order of the import package
parts. And some code comments are also added.
* Add a configuration of the `conda` environment
* Add a simple test case for testing if the service can be startup in
current `conda` environment. It is succeed in VSCode, but the it is not
out of box on terminal. So, it is hard to say the test case really
useful.
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): add make target and entrypoints for the dockerfile
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add seperate conda env for diffusers (#1145)
**Description**
This PR relates to #1117
**Notes for Reviewers**
* Add `conda` env `diffusers.yml`
* Add Makefile to create it automatically
* Add `run.sh` to support running as a extra backend
* Also adding it to the main Dockerfile
* Add make command in the root Makefile
* Testing the server, it can start up under the env
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for vllm (#1148)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server can be started as normal
* The test case can be triggered in VSCode
* Same to other this kind of PRs, add `vllm.yml` Makefile and add
`run.sh` to the main Dockerfile, and command to the main Makefile
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for huggingface (#1146)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* Add conda env `huggingface.yml`
* Change the import order, and also remove the no-used packages
* Add `run.sh` and `make command` to the main Dockerfile and Makefile
* Add test cases for it. It can be triggered and succeed under VSCode
Python extension but it is hang by using `python -m unites
test_huggingface.py` in the terminal
```
Running tests (unittest): /workspaces/LocalAI/extra/grpc/huggingface
Running tests: /workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_embedding
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_load_model
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_server_startup
./test_huggingface.py::TestBackendServicer::test_embedding Passed
./test_huggingface.py::TestBackendServicer::test_load_model Passed
./test_huggingface.py::TestBackendServicer::test_server_startup Passed
Total number of tests expected to run: 3
Total number of tests run: 3
Total number of tests passed: 3
Total number of tests failed: 0
Total number of tests failed with errors: 0
Total number of tests skipped: 0
Finished running tests!
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add the seperate conda env for VALL-E X (#1147)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server cannot start up
```
(ttsvalle) @Aisuko ➜ /workspaces/LocalAI (feat/vall-e-x) $ /opt/conda/envs/ttsvalle/bin/python /workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py
Traceback (most recent call last):
File "/workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py", line 14, in <module>
from utils.generation import SAMPLE_RATE, generate_audio, preload_models
ModuleNotFoundError: No module named 'utils'
```
The installation steps follow
https://github.com/Plachtaa/VALL-E-X#-installation below:
* Under the `ttsvalle` conda env
```
git clone https://github.com/Plachtaa/VALL-E-X.git
cd VALL-E-X
pip install -r requirements.txt
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix: set image type
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate conda env for exllama (#1149)
Add seperate env for exllama
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Setup conda
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Set image_type arg
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* ci: prepare only conda env in tests
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Dockerfile: comment manual pip calls
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* conda: add conda to PATH
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fixes
* add shebang
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* file perms
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* debug
* Install new conda in the worker
* Disable GPU tests for now until the worker is back
* Rename workflows
* debug
* Fixup conda install
* fixup(wrapper): pass args
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Aisuko <urakiny@gmail.com>
2023-11-04 14:30:32 +00:00
|
|
|
wget -q https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin -O test-models/whisper-en
|
|
|
|
|
wget -q https://huggingface.co/mudler/all-MiniLM-L6-v2/resolve/main/ggml-model-q4_0.bin -O test-models/bert
|
|
|
|
|
wget -q https://cdn.openai.com/whisper/draft-20220913a/micro-machines.wav -O test-dir/audio.wav
|
2023-05-18 13:59:03 +00:00
|
|
|
cp tests/models_fixtures/* test-models
|
2023-04-21 22:44:52 +00:00
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
prepare-test: protogen-go
|
2023-05-18 13:59:03 +00:00
|
|
|
cp tests/models_fixtures/* test-models
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## Tests
|
|
|
|
|
########################################################
|
|
|
|
|
|
2025-05-04 14:42:42 +00:00
|
|
|
## Test targets
|
2025-07-22 14:31:04 +00:00
|
|
|
test: test-models/testmodel.ggml protogen-go
|
2023-07-14 23:19:43 +00:00
|
|
|
@echo 'Running tests'
|
2025-07-19 06:31:33 +00:00
|
|
|
export GO_TAGS="debug"
|
2023-07-14 23:19:43 +00:00
|
|
|
$(MAKE) prepare-test
|
2025-07-18 11:24:12 +00:00
|
|
|
HUGGINGFACE_GRPC=$(abspath ./)/backend/python/transformers/run.sh TEST_DIR=$(abspath ./)/test-dir/ FIXTURES=$(abspath ./)/tests/fixtures CONFIG_FILE=$(abspath ./)/test-models/config.yaml MODELS_PATH=$(abspath ./)/test-models BACKENDS_PATH=$(abspath ./)/backends \
|
2025-02-06 17:36:23 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --label-filter="!llama-gguf" --flake-attempts $(TEST_FLAKES) --fail-fast -v -r $(TEST_PATHS)
|
2023-08-23 23:18:58 +00:00
|
|
|
$(MAKE) test-llama-gguf
|
2023-07-14 23:19:43 +00:00
|
|
|
$(MAKE) test-tts
|
|
|
|
|
$(MAKE) test-stablediffusion
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
backends/llama-cpp: docker-build-llama-cpp docker-save-llama-cpp build
|
2025-07-18 11:24:12 +00:00
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/llama-cpp.tar)"
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
backends/piper: docker-build-piper docker-save-piper build
|
2025-07-19 06:31:33 +00:00
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/piper.tar)"
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
backends/stablediffusion-ggml: docker-build-stablediffusion-ggml docker-save-stablediffusion-ggml build
|
2025-07-19 19:58:53 +00:00
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/stablediffusion-ggml.tar)"
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
backends/whisper: docker-build-whisper docker-save-whisper build
|
2025-07-20 20:52:45 +00:00
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/whisper.tar)"
|
2025-07-22 14:31:04 +00:00
|
|
|
|
|
|
|
|
backends/silero-vad: docker-build-silero-vad docker-save-silero-vad build
|
|
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/silero-vad.tar)"
|
|
|
|
|
|
|
|
|
|
backends/local-store: docker-build-local-store docker-save-local-store build
|
|
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/local-store.tar)"
|
|
|
|
|
|
|
|
|
|
backends/huggingface: docker-build-huggingface docker-save-huggingface build
|
|
|
|
|
./local-ai backends install "ocifile://$(abspath ./backend-images/huggingface.tar)"
|
2025-07-20 20:52:45 +00:00
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## AIO tests
|
|
|
|
|
########################################################
|
|
|
|
|
|
|
|
|
|
docker-build-aio:
|
|
|
|
|
docker build --build-arg MAKEFLAGS="--jobs=5 --output-sync=target" -t local-ai:tests -f Dockerfile .
|
|
|
|
|
BASE_IMAGE=local-ai:tests DOCKER_AIO_IMAGE=local-ai-aio:test $(MAKE) docker-aio
|
|
|
|
|
|
|
|
|
|
e2e-aio:
|
|
|
|
|
LOCALAI_BACKEND_DIR=$(abspath ./backends) \
|
|
|
|
|
LOCALAI_MODELS_DIR=$(abspath ./models) \
|
|
|
|
|
LOCALAI_IMAGE_TAG=test \
|
|
|
|
|
LOCALAI_IMAGE=local-ai-aio \
|
|
|
|
|
$(MAKE) run-e2e-aio
|
|
|
|
|
|
|
|
|
|
run-e2e-aio: protogen-go
|
|
|
|
|
@echo 'Running e2e AIO tests'
|
|
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --flake-attempts $(TEST_FLAKES) -v -r ./tests/e2e-aio
|
|
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
|
## E2E tests
|
|
|
|
|
########################################################
|
|
|
|
|
|
2023-10-19 11:50:40 +00:00
|
|
|
prepare-e2e:
|
|
|
|
|
mkdir -p $(TEST_DIR)
|
|
|
|
|
cp -rfv $(abspath ./tests/e2e-fixtures)/gpu.yaml $(TEST_DIR)/gpu.yaml
|
|
|
|
|
test -e $(TEST_DIR)/ggllm-test-model.bin || wget -q https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF/resolve/main/codellama-7b-instruct.Q2_K.gguf -O $(TEST_DIR)/ggllm-test-model.bin
|
2025-07-22 14:31:04 +00:00
|
|
|
docker build --build-arg IMAGE_TYPE=core --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg CUDA_MAJOR_VERSION=12 --build-arg CUDA_MINOR_VERSION=0 -t localai-tests .
|
2023-10-19 11:50:40 +00:00
|
|
|
|
|
|
|
|
run-e2e-image:
|
|
|
|
|
ls -liah $(abspath ./tests/e2e-fixtures)
|
|
|
|
|
docker run -p 5390:8080 -e MODELS_PATH=/models -e THREADS=1 -e DEBUG=true -d --rm -v $(TEST_DIR):/models --gpus all --name e2e-tests-$(RANDOM) localai-tests
|
|
|
|
|
|
|
|
|
|
test-e2e:
|
|
|
|
|
@echo 'Running e2e tests'
|
|
|
|
|
BUILD_TYPE=$(BUILD_TYPE) \
|
|
|
|
|
LOCALAI_API=http://$(E2E_BRIDGE_IP):5390/v1 \
|
2024-10-08 07:24:19 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --flake-attempts $(TEST_FLAKES) -v -r ./tests/e2e
|
2023-10-19 11:50:40 +00:00
|
|
|
|
|
|
|
|
teardown-e2e:
|
|
|
|
|
rm -rf $(TEST_DIR) || true
|
|
|
|
|
docker stop $$(docker ps -q --filter ancestor=localai-tests)
|
|
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## Integration and unit tests
|
|
|
|
|
########################################################
|
|
|
|
|
|
2023-08-23 23:18:58 +00:00
|
|
|
test-llama-gguf: prepare-test
|
2025-07-18 11:24:12 +00:00
|
|
|
TEST_DIR=$(abspath ./)/test-dir/ FIXTURES=$(abspath ./)/tests/fixtures CONFIG_FILE=$(abspath ./)/test-models/config.yaml MODELS_PATH=$(abspath ./)/test-models BACKENDS_PATH=$(abspath ./)/backends \
|
2024-10-08 07:24:19 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --label-filter="llama-gguf" --flake-attempts $(TEST_FLAKES) -v -r $(TEST_PATHS)
|
2023-08-23 23:18:58 +00:00
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
test-tts: prepare-test
|
2025-07-18 11:24:12 +00:00
|
|
|
TEST_DIR=$(abspath ./)/test-dir/ FIXTURES=$(abspath ./)/tests/fixtures CONFIG_FILE=$(abspath ./)/test-models/config.yaml MODELS_PATH=$(abspath ./)/test-models BACKENDS_PATH=$(abspath ./)/backends \
|
2024-10-08 07:24:19 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --label-filter="tts" --flake-attempts $(TEST_FLAKES) -v -r $(TEST_PATHS)
|
2023-07-14 23:19:43 +00:00
|
|
|
|
|
|
|
|
test-stablediffusion: prepare-test
|
2025-07-18 11:24:12 +00:00
|
|
|
TEST_DIR=$(abspath ./)/test-dir/ FIXTURES=$(abspath ./)/tests/fixtures CONFIG_FILE=$(abspath ./)/test-models/config.yaml MODELS_PATH=$(abspath ./)/test-models BACKENDS_PATH=$(abspath ./)/backends \
|
2024-10-08 07:24:19 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --label-filter="stablediffusion" --flake-attempts $(TEST_FLAKES) -v -r $(TEST_PATHS)
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
test-stores:
|
2024-10-08 07:24:19 +00:00
|
|
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --label-filter="stores" --flake-attempts $(TEST_FLAKES) -v -r tests/integration
|
2024-03-22 20:14:04 +00:00
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
test-container:
|
|
|
|
|
docker build --target requirements -t local-ai-test-container .
|
2023-07-20 20:10:42 +00:00
|
|
|
docker run -ti --rm --entrypoint /bin/bash -ti -v $(abspath ./):/build local-ai-test-container
|
2023-04-15 23:39:07 +00:00
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## Help
|
|
|
|
|
########################################################
|
|
|
|
|
|
2023-04-15 23:39:07 +00:00
|
|
|
## Help:
|
|
|
|
|
help: ## Show this help.
|
|
|
|
|
@echo ''
|
|
|
|
|
@echo 'Usage:'
|
|
|
|
|
@echo ' ${YELLOW}make${RESET} ${GREEN}<target>${RESET}'
|
|
|
|
|
@echo ''
|
|
|
|
|
@echo 'Targets:'
|
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} { \
|
|
|
|
|
if (/^[a-zA-Z_-]+:.*?##.*$$/) {printf " ${YELLOW}%-20s${GREEN}%s${RESET}\n", $$1, $$2} \
|
|
|
|
|
else if (/^## .*$$/) {printf " ${CYAN}%s${RESET}\n", substr($$1,4)} \
|
2023-04-17 19:34:02 +00:00
|
|
|
}' $(MAKEFILE_LIST)
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## Backends
|
|
|
|
|
########################################################
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: protogen
|
2023-07-20 20:10:42 +00:00
|
|
|
protogen: protogen-go protogen-python
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: protogen-clean
|
|
|
|
|
protogen-clean: protogen-go-clean protogen-python-clean
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
protoc:
|
|
|
|
|
@OS_NAME=$$(uname -s | tr '[:upper:]' '[:lower:]'); \
|
|
|
|
|
ARCH_NAME=$$(uname -m); \
|
|
|
|
|
if [ "$$OS_NAME" = "darwin" ]; then \
|
|
|
|
|
if [ "$$ARCH_NAME" = "arm64" ]; then \
|
|
|
|
|
FILE=protoc-31.1-osx-aarch_64.zip; \
|
|
|
|
|
elif [ "$$ARCH_NAME" = "x86_64" ]; then \
|
|
|
|
|
FILE=protoc-31.1-osx-x86_64.zip; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Unsupported macOS architecture: $$ARCH_NAME"; exit 1; \
|
|
|
|
|
fi; \
|
|
|
|
|
elif [ "$$OS_NAME" = "linux" ]; then \
|
|
|
|
|
if [ "$$ARCH_NAME" = "x86_64" ]; then \
|
|
|
|
|
FILE=protoc-31.1-linux-x86_64.zip; \
|
|
|
|
|
elif [ "$$ARCH_NAME" = "aarch64" ] || [ "$$ARCH_NAME" = "arm64" ]; then \
|
|
|
|
|
FILE=protoc-31.1-linux-aarch_64.zip; \
|
|
|
|
|
elif [ "$$ARCH_NAME" = "ppc64le" ]; then \
|
|
|
|
|
FILE=protoc-31.1-linux-ppcle_64.zip; \
|
|
|
|
|
elif [ "$$ARCH_NAME" = "s390x" ]; then \
|
|
|
|
|
FILE=protoc-31.1-linux-s390_64.zip; \
|
|
|
|
|
elif [ "$$ARCH_NAME" = "i386" ] || [ "$$ARCH_NAME" = "x86" ]; then \
|
|
|
|
|
FILE=protoc-31.1-linux-x86_32.zip; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Unsupported Linux architecture: $$ARCH_NAME"; exit 1; \
|
|
|
|
|
fi; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Unsupported OS: $$OS_NAME"; exit 1; \
|
|
|
|
|
fi; \
|
|
|
|
|
URL=https://github.com/protocolbuffers/protobuf/releases/download/v31.1/$$FILE; \
|
|
|
|
|
curl -L -s $$URL -o protoc.zip && \
|
|
|
|
|
unzip -j -d $(CURDIR) protoc.zip bin/protoc && rm protoc.zip
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: protogen-go
|
2025-07-22 14:31:04 +00:00
|
|
|
protogen-go: protoc install-go-tools
|
2024-04-13 07:37:32 +00:00
|
|
|
mkdir -p pkg/grpc/proto
|
2025-07-22 14:31:04 +00:00
|
|
|
./protoc --experimental_allow_proto3_optional -Ibackend/ --go_out=pkg/grpc/proto/ --go_opt=paths=source_relative --go-grpc_out=pkg/grpc/proto/ --go-grpc_opt=paths=source_relative \
|
2023-11-13 21:40:16 +00:00
|
|
|
backend/backend.proto
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: protogen-go-clean
|
|
|
|
|
protogen-go-clean:
|
|
|
|
|
$(RM) pkg/grpc/proto/backend.pb.go pkg/grpc/proto/backend_grpc.pb.go
|
|
|
|
|
$(RM) bin/*
|
|
|
|
|
|
|
|
|
|
.PHONY: protogen-python
|
2025-05-30 08:52:55 +00:00
|
|
|
protogen-python: bark-protogen coqui-protogen chatterbox-protogen diffusers-protogen exllama2-protogen rerankers-protogen transformers-protogen kokoro-protogen vllm-protogen faster-whisper-protogen
|
2024-04-13 07:37:32 +00:00
|
|
|
|
|
|
|
|
.PHONY: protogen-python-clean
|
2025-05-30 08:52:55 +00:00
|
|
|
protogen-python-clean: bark-protogen-clean coqui-protogen-clean chatterbox-protogen-clean diffusers-protogen-clean exllama2-protogen-clean rerankers-protogen-clean transformers-protogen-clean kokoro-protogen-clean vllm-protogen-clean faster-whisper-protogen-clean
|
2024-04-13 07:37:32 +00:00
|
|
|
|
|
|
|
|
.PHONY: bark-protogen
|
|
|
|
|
bark-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/bark protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: bark-protogen-clean
|
|
|
|
|
bark-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/bark protogen-clean
|
|
|
|
|
|
|
|
|
|
.PHONY: coqui-protogen
|
|
|
|
|
coqui-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/coqui protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: coqui-protogen-clean
|
|
|
|
|
coqui-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/coqui protogen-clean
|
|
|
|
|
|
|
|
|
|
.PHONY: diffusers-protogen
|
|
|
|
|
diffusers-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/diffusers protogen
|
|
|
|
|
|
2025-05-30 08:52:55 +00:00
|
|
|
.PHONY: chatterbox-protogen
|
|
|
|
|
chatterbox-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/chatterbox protogen
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: diffusers-protogen-clean
|
|
|
|
|
diffusers-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/diffusers protogen-clean
|
|
|
|
|
|
2025-05-30 08:52:55 +00:00
|
|
|
.PHONY: chatterbox-protogen-clean
|
|
|
|
|
chatterbox-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/chatterbox protogen-clean
|
|
|
|
|
|
2025-01-23 07:06:18 +00:00
|
|
|
.PHONY: faster-whisper-protogen
|
|
|
|
|
faster-whisper-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/faster-whisper protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: faster-whisper-protogen-clean
|
|
|
|
|
faster-whisper-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/faster-whisper protogen-clean
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: exllama2-protogen
|
|
|
|
|
exllama2-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/exllama2 protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: exllama2-protogen-clean
|
|
|
|
|
exllama2-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/exllama2 protogen-clean
|
|
|
|
|
|
2024-04-24 22:19:02 +00:00
|
|
|
.PHONY: rerankers-protogen
|
|
|
|
|
rerankers-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/rerankers protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: rerankers-protogen-clean
|
|
|
|
|
rerankers-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/rerankers protogen-clean
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: transformers-protogen
|
|
|
|
|
transformers-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/transformers protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: transformers-protogen-clean
|
|
|
|
|
transformers-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/transformers protogen-clean
|
|
|
|
|
|
2025-01-16 21:23:09 +00:00
|
|
|
.PHONY: kokoro-protogen
|
|
|
|
|
kokoro-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/kokoro protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: kokoro-protogen-clean
|
|
|
|
|
kokoro-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/kokoro protogen-clean
|
|
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
.PHONY: vllm-protogen
|
|
|
|
|
vllm-protogen:
|
|
|
|
|
$(MAKE) -C backend/python/vllm protogen
|
|
|
|
|
|
|
|
|
|
.PHONY: vllm-protogen-clean
|
|
|
|
|
vllm-protogen-clean:
|
|
|
|
|
$(MAKE) -C backend/python/vllm protogen-clean
|
2023-07-20 20:10:42 +00:00
|
|
|
|
feat(conda): conda environments (#1144)
* feat(autogptq): add a separate conda environment for autogptq (#1137)
**Description**
This PR related to #1117
**Notes for Reviewers**
Here we lock down the version of the dependencies. Make sure it can be
used all the time without failed if the version of dependencies were
upgraded.
I change the order of importing packages according to the pylint, and no
change the logic of code. It should be ok.
I will do more investigate on writing some test cases for every backend.
I can run the service in my environment, but there is not exist a way to
test it. So, I am not confident on it.
Add a README.md in the `grpc` root. This is the common commands for
creating `conda` environment. And it can be used to the reference file
for creating extral gRPC backend document.
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* [Extra backend] Add seperate environment for ttsbark (#1141)
**Description**
This PR relates to #1117
**Notes for Reviewers**
Same to the latest PR:
* The code is also changed, but only the order of the import package
parts. And some code comments are also added.
* Add a configuration of the `conda` environment
* Add a simple test case for testing if the service can be startup in
current `conda` environment. It is succeed in VSCode, but the it is not
out of box on terminal. So, it is hard to say the test case really
useful.
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): add make target and entrypoints for the dockerfile
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add seperate conda env for diffusers (#1145)
**Description**
This PR relates to #1117
**Notes for Reviewers**
* Add `conda` env `diffusers.yml`
* Add Makefile to create it automatically
* Add `run.sh` to support running as a extra backend
* Also adding it to the main Dockerfile
* Add make command in the root Makefile
* Testing the server, it can start up under the env
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for vllm (#1148)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server can be started as normal
* The test case can be triggered in VSCode
* Same to other this kind of PRs, add `vllm.yml` Makefile and add
`run.sh` to the main Dockerfile, and command to the main Makefile
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for huggingface (#1146)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* Add conda env `huggingface.yml`
* Change the import order, and also remove the no-used packages
* Add `run.sh` and `make command` to the main Dockerfile and Makefile
* Add test cases for it. It can be triggered and succeed under VSCode
Python extension but it is hang by using `python -m unites
test_huggingface.py` in the terminal
```
Running tests (unittest): /workspaces/LocalAI/extra/grpc/huggingface
Running tests: /workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_embedding
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_load_model
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_server_startup
./test_huggingface.py::TestBackendServicer::test_embedding Passed
./test_huggingface.py::TestBackendServicer::test_load_model Passed
./test_huggingface.py::TestBackendServicer::test_server_startup Passed
Total number of tests expected to run: 3
Total number of tests run: 3
Total number of tests passed: 3
Total number of tests failed: 0
Total number of tests failed with errors: 0
Total number of tests skipped: 0
Finished running tests!
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add the seperate conda env for VALL-E X (#1147)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server cannot start up
```
(ttsvalle) @Aisuko ➜ /workspaces/LocalAI (feat/vall-e-x) $ /opt/conda/envs/ttsvalle/bin/python /workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py
Traceback (most recent call last):
File "/workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py", line 14, in <module>
from utils.generation import SAMPLE_RATE, generate_audio, preload_models
ModuleNotFoundError: No module named 'utils'
```
The installation steps follow
https://github.com/Plachtaa/VALL-E-X#-installation below:
* Under the `ttsvalle` conda env
```
git clone https://github.com/Plachtaa/VALL-E-X.git
cd VALL-E-X
pip install -r requirements.txt
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix: set image type
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate conda env for exllama (#1149)
Add seperate env for exllama
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Setup conda
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Set image_type arg
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* ci: prepare only conda env in tests
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Dockerfile: comment manual pip calls
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* conda: add conda to PATH
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fixes
* add shebang
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* file perms
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* debug
* Install new conda in the worker
* Disable GPU tests for now until the worker is back
* Rename workflows
* debug
* Fixup conda install
* fixup(wrapper): pass args
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Aisuko <urakiny@gmail.com>
2023-11-04 14:30:32 +00:00
|
|
|
|
2024-04-13 07:37:32 +00:00
|
|
|
prepare-test-extra: protogen-python
|
2023-12-08 14:45:04 +00:00
|
|
|
$(MAKE) -C backend/python/transformers
|
2023-12-11 07:20:34 +00:00
|
|
|
$(MAKE) -C backend/python/diffusers
|
2025-05-30 08:52:55 +00:00
|
|
|
$(MAKE) -C backend/python/chatterbox
|
2025-04-30 12:55:07 +00:00
|
|
|
$(MAKE) -C backend/python/vllm
|
2023-12-08 14:45:04 +00:00
|
|
|
|
|
|
|
|
test-extra: prepare-test-extra
|
|
|
|
|
$(MAKE) -C backend/python/transformers test
|
2023-12-11 07:20:34 +00:00
|
|
|
$(MAKE) -C backend/python/diffusers test
|
2025-05-30 08:52:55 +00:00
|
|
|
$(MAKE) -C backend/python/chatterbox test
|
2025-04-30 12:55:07 +00:00
|
|
|
$(MAKE) -C backend/python/vllm test
|
feat(conda): conda environments (#1144)
* feat(autogptq): add a separate conda environment for autogptq (#1137)
**Description**
This PR related to #1117
**Notes for Reviewers**
Here we lock down the version of the dependencies. Make sure it can be
used all the time without failed if the version of dependencies were
upgraded.
I change the order of importing packages according to the pylint, and no
change the logic of code. It should be ok.
I will do more investigate on writing some test cases for every backend.
I can run the service in my environment, but there is not exist a way to
test it. So, I am not confident on it.
Add a README.md in the `grpc` root. This is the common commands for
creating `conda` environment. And it can be used to the reference file
for creating extral gRPC backend document.
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* [Extra backend] Add seperate environment for ttsbark (#1141)
**Description**
This PR relates to #1117
**Notes for Reviewers**
Same to the latest PR:
* The code is also changed, but only the order of the import package
parts. And some code comments are also added.
* Add a configuration of the `conda` environment
* Add a simple test case for testing if the service can be startup in
current `conda` environment. It is succeed in VSCode, but the it is not
out of box on terminal. So, it is hard to say the test case really
useful.
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): add make target and entrypoints for the dockerfile
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add seperate conda env for diffusers (#1145)
**Description**
This PR relates to #1117
**Notes for Reviewers**
* Add `conda` env `diffusers.yml`
* Add Makefile to create it automatically
* Add `run.sh` to support running as a extra backend
* Also adding it to the main Dockerfile
* Add make command in the root Makefile
* Testing the server, it can start up under the env
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for vllm (#1148)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server can be started as normal
* The test case can be triggered in VSCode
* Same to other this kind of PRs, add `vllm.yml` Makefile and add
`run.sh` to the main Dockerfile, and command to the main Makefile
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate env for huggingface (#1146)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* Add conda env `huggingface.yml`
* Change the import order, and also remove the no-used packages
* Add `run.sh` and `make command` to the main Dockerfile and Makefile
* Add test cases for it. It can be triggered and succeed under VSCode
Python extension but it is hang by using `python -m unites
test_huggingface.py` in the terminal
```
Running tests (unittest): /workspaces/LocalAI/extra/grpc/huggingface
Running tests: /workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_embedding
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_load_model
/workspaces/LocalAI/extra/grpc/huggingface/test_huggingface.py::TestBackendServicer::test_server_startup
./test_huggingface.py::TestBackendServicer::test_embedding Passed
./test_huggingface.py::TestBackendServicer::test_load_model Passed
./test_huggingface.py::TestBackendServicer::test_server_startup Passed
Total number of tests expected to run: 3
Total number of tests run: 3
Total number of tests passed: 3
Total number of tests failed: 0
Total number of tests failed with errors: 0
Total number of tests skipped: 0
Finished running tests!
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda): Add the seperate conda env for VALL-E X (#1147)
**Description**
This PR is related to #1117
**Notes for Reviewers**
* The gRPC server cannot start up
```
(ttsvalle) @Aisuko ➜ /workspaces/LocalAI (feat/vall-e-x) $ /opt/conda/envs/ttsvalle/bin/python /workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py
Traceback (most recent call last):
File "/workspaces/LocalAI/extra/grpc/vall-e-x/ttsvalle.py", line 14, in <module>
from utils.generation import SAMPLE_RATE, generate_audio, preload_models
ModuleNotFoundError: No module named 'utils'
```
The installation steps follow
https://github.com/Plachtaa/VALL-E-X#-installation below:
* Under the `ttsvalle` conda env
```
git clone https://github.com/Plachtaa/VALL-E-X.git
cd VALL-E-X
pip install -r requirements.txt
```
**[Signed
commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
- [x] Yes, I signed my commits.
<!--
Thank you for contributing to LocalAI!
Contributing Conventions
-------------------------
The draft above helps to give a quick overview of your PR.
Remember to remove this comment and to at least:
1. Include descriptive PR titles with [<component-name>] prepended. We
use [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
2. Build and test your changes before submitting a PR (`make build`).
3. Sign your commits
4. **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below).
5. **X/Twitter handle:** we announce bigger features on X/Twitter. If
your PR gets announced, and you'd like a mention, we'll gladly shout you
out!
By following the community's contribution conventions upfront, the
review process will
be accelerated and your PR merged more quickly.
If no one reviews your PR within a few days, please @-mention @mudler.
-->
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix: set image type
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(conda):Add seperate conda env for exllama (#1149)
Add seperate env for exllama
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Setup conda
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Set image_type arg
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* ci: prepare only conda env in tests
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Dockerfile: comment manual pip calls
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* conda: add conda to PATH
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fixes
* add shebang
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* file perms
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* debug
* Install new conda in the worker
* Disable GPU tests for now until the worker is back
* Rename workflows
* debug
* Fixup conda install
* fixup(wrapper): pass args
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Aisuko <urakiny@gmail.com>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Aisuko <urakiny@gmail.com>
2023-11-04 14:30:32 +00:00
|
|
|
|
2024-02-08 19:12:51 +00:00
|
|
|
DOCKER_IMAGE?=local-ai
|
2024-03-21 00:12:20 +00:00
|
|
|
DOCKER_AIO_IMAGE?=local-ai-aio
|
2024-02-08 19:12:51 +00:00
|
|
|
IMAGE_TYPE?=core
|
|
|
|
|
BASE_IMAGE?=ubuntu:22.04
|
|
|
|
|
|
|
|
|
|
docker:
|
|
|
|
|
docker build \
|
|
|
|
|
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
|
|
|
|
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
|
2024-03-27 20:12:19 +00:00
|
|
|
--build-arg GO_TAGS="$(GO_TAGS)" \
|
2024-03-29 21:32:40 +00:00
|
|
|
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
|
2024-02-08 19:12:51 +00:00
|
|
|
--build-arg BUILD_TYPE=$(BUILD_TYPE) \
|
|
|
|
|
-t $(DOCKER_IMAGE) .
|
2024-05-13 09:37:52 +00:00
|
|
|
|
2024-06-19 15:50:49 +00:00
|
|
|
docker-cuda11:
|
|
|
|
|
docker build \
|
|
|
|
|
--build-arg CUDA_MAJOR_VERSION=11 \
|
|
|
|
|
--build-arg CUDA_MINOR_VERSION=8 \
|
|
|
|
|
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
|
|
|
|
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
|
|
|
|
|
--build-arg GO_TAGS="$(GO_TAGS)" \
|
|
|
|
|
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
|
|
|
|
|
--build-arg BUILD_TYPE=$(BUILD_TYPE) \
|
|
|
|
|
-t $(DOCKER_IMAGE)-cuda11 .
|
|
|
|
|
|
2024-03-21 00:12:20 +00:00
|
|
|
docker-aio:
|
2024-03-21 21:09:04 +00:00
|
|
|
@echo "Building AIO image with base $(BASE_IMAGE) as $(DOCKER_AIO_IMAGE)"
|
2024-03-21 00:12:20 +00:00
|
|
|
docker build \
|
|
|
|
|
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
2024-03-29 21:32:40 +00:00
|
|
|
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
|
2024-03-21 00:12:20 +00:00
|
|
|
-t $(DOCKER_AIO_IMAGE) -f Dockerfile.aio .
|
|
|
|
|
|
|
|
|
|
docker-aio-all:
|
|
|
|
|
$(MAKE) docker-aio DOCKER_AIO_SIZE=cpu
|
|
|
|
|
$(MAKE) docker-aio DOCKER_AIO_SIZE=cpu
|
2024-02-08 19:12:51 +00:00
|
|
|
|
|
|
|
|
docker-image-intel:
|
|
|
|
|
docker build \
|
2025-07-08 10:54:20 +00:00
|
|
|
--build-arg BASE_IMAGE=intel/oneapi-basekit:${ONEAPI_VERSION}.0-0-devel-ubuntu24.04 \
|
2024-02-08 19:12:51 +00:00
|
|
|
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
|
2025-05-25 20:25:05 +00:00
|
|
|
--build-arg GO_TAGS="$(GO_TAGS)" \
|
2024-03-29 21:32:40 +00:00
|
|
|
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
|
2024-02-14 20:44:12 +00:00
|
|
|
--build-arg BUILD_TYPE=sycl_f32 -t $(DOCKER_IMAGE) .
|
2024-03-07 13:37:45 +00:00
|
|
|
|
|
|
|
|
docker-image-intel-xpu:
|
|
|
|
|
docker build \
|
2025-07-08 10:54:20 +00:00
|
|
|
--build-arg BASE_IMAGE=intel/oneapi-basekit:${ONEAPI_VERSION}.0-0-devel-ubuntu22.04 \
|
2024-03-07 13:37:45 +00:00
|
|
|
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
|
2025-05-25 20:25:05 +00:00
|
|
|
--build-arg GO_TAGS="$(GO_TAGS)" \
|
2024-03-29 21:32:40 +00:00
|
|
|
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
|
2024-03-22 20:14:04 +00:00
|
|
|
--build-arg BUILD_TYPE=sycl_f32 -t $(DOCKER_IMAGE) .
|
2024-03-29 21:29:33 +00:00
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
########################################################
|
|
|
|
|
## Backends
|
|
|
|
|
########################################################
|
|
|
|
|
|
|
|
|
|
backend-images:
|
|
|
|
|
mkdir -p backend-images
|
|
|
|
|
|
|
|
|
|
docker-build-llama-cpp:
|
2025-07-20 20:52:45 +00:00
|
|
|
docker build --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg IMAGE_BASE=$(IMAGE_BASE) -t local-ai-backend:llama-cpp -f backend/Dockerfile.llama-cpp .
|
2025-07-18 11:24:12 +00:00
|
|
|
|
|
|
|
|
docker-build-bark-cpp:
|
|
|
|
|
docker build -t local-ai-backend:bark-cpp -f backend/Dockerfile.go --build-arg BACKEND=bark-cpp .
|
|
|
|
|
|
2025-07-19 06:31:33 +00:00
|
|
|
docker-build-piper:
|
|
|
|
|
docker build -t local-ai-backend:piper -f backend/Dockerfile.go --build-arg BACKEND=piper .
|
|
|
|
|
|
2025-07-22 14:31:04 +00:00
|
|
|
docker-build-local-store:
|
|
|
|
|
docker build -t local-ai-backend:local-store -f backend/Dockerfile.go --build-arg BACKEND=local-store .
|
|
|
|
|
|
|
|
|
|
docker-build-huggingface:
|
|
|
|
|
docker build -t local-ai-backend:huggingface -f backend/Dockerfile.go --build-arg BACKEND=huggingface .
|
|
|
|
|
|
|
|
|
|
docker-save-huggingface: backend-images
|
|
|
|
|
docker save local-ai-backend:huggingface -o backend-images/huggingface.tar
|
|
|
|
|
|
|
|
|
|
docker-save-local-store: backend-images
|
|
|
|
|
docker save local-ai-backend:local-store -o backend-images/local-store.tar
|
|
|
|
|
|
|
|
|
|
docker-build-silero-vad:
|
|
|
|
|
docker build -t local-ai-backend:silero-vad -f backend/Dockerfile.go --build-arg BACKEND=silero-vad .
|
|
|
|
|
|
|
|
|
|
docker-save-silero-vad: backend-images
|
|
|
|
|
docker save local-ai-backend:silero-vad -o backend-images/silero-vad.tar
|
|
|
|
|
|
2025-07-19 06:31:33 +00:00
|
|
|
docker-save-piper: backend-images
|
|
|
|
|
docker save local-ai-backend:piper -o backend-images/piper.tar
|
|
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
docker-save-llama-cpp: backend-images
|
|
|
|
|
docker save local-ai-backend:llama-cpp -o backend-images/llama-cpp.tar
|
|
|
|
|
|
2025-07-19 06:31:33 +00:00
|
|
|
docker-save-bark-cpp: backend-images
|
|
|
|
|
docker save local-ai-backend:bark-cpp -o backend-images/bark-cpp.tar
|
2025-07-18 11:24:12 +00:00
|
|
|
|
2025-07-19 19:58:53 +00:00
|
|
|
docker-build-stablediffusion-ggml:
|
|
|
|
|
docker build -t local-ai-backend:stablediffusion-ggml -f backend/Dockerfile.go --build-arg BACKEND=stablediffusion-ggml .
|
|
|
|
|
|
|
|
|
|
docker-save-stablediffusion-ggml: backend-images
|
|
|
|
|
docker save local-ai-backend:stablediffusion-ggml -o backend-images/stablediffusion-ggml.tar
|
|
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
docker-build-rerankers:
|
|
|
|
|
docker build -t local-ai-backend:rerankers -f backend/Dockerfile.python --build-arg BACKEND=rerankers .
|
|
|
|
|
|
|
|
|
|
docker-build-vllm:
|
|
|
|
|
docker build -t local-ai-backend:vllm -f backend/Dockerfile.python --build-arg BACKEND=vllm .
|
|
|
|
|
|
|
|
|
|
docker-build-transformers:
|
|
|
|
|
docker build -t local-ai-backend:transformers -f backend/Dockerfile.python --build-arg BACKEND=transformers .
|
|
|
|
|
|
|
|
|
|
docker-build-diffusers:
|
|
|
|
|
docker build -t local-ai-backend:diffusers -f backend/Dockerfile.python --build-arg BACKEND=diffusers .
|
|
|
|
|
|
|
|
|
|
docker-build-kokoro:
|
|
|
|
|
docker build -t local-ai-backend:kokoro -f backend/Dockerfile.python --build-arg BACKEND=kokoro .
|
|
|
|
|
|
2025-07-20 20:52:45 +00:00
|
|
|
docker-build-whisper:
|
|
|
|
|
docker build --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg BASE_IMAGE=$(BASE_IMAGE) -t local-ai-backend:whisper -f backend/Dockerfile.go --build-arg BACKEND=whisper .
|
|
|
|
|
|
|
|
|
|
docker-save-whisper: backend-images
|
|
|
|
|
docker save local-ai-backend:whisper -o backend-images/whisper.tar
|
|
|
|
|
|
2025-07-18 11:24:12 +00:00
|
|
|
docker-build-faster-whisper:
|
|
|
|
|
docker build -t local-ai-backend:faster-whisper -f backend/Dockerfile.python --build-arg BACKEND=faster-whisper .
|
|
|
|
|
|
|
|
|
|
docker-build-coqui:
|
|
|
|
|
docker build -t local-ai-backend:coqui -f backend/Dockerfile.python --build-arg BACKEND=coqui .
|
|
|
|
|
|
|
|
|
|
docker-build-bark:
|
|
|
|
|
docker build -t local-ai-backend:bark -f backend/Dockerfile.python --build-arg BACKEND=bark .
|
|
|
|
|
|
|
|
|
|
docker-build-chatterbox:
|
|
|
|
|
docker build -t local-ai-backend:chatterbox -f backend/Dockerfile.python --build-arg BACKEND=chatterbox .
|
|
|
|
|
|
|
|
|
|
docker-build-exllama2:
|
|
|
|
|
docker build -t local-ai-backend:exllama2 -f backend/Dockerfile.python --build-arg BACKEND=exllama2 .
|
|
|
|
|
|
|
|
|
|
docker-build-backends: docker-build-llama-cpp docker-build-rerankers docker-build-vllm docker-build-transformers docker-build-diffusers docker-build-kokoro docker-build-faster-whisper docker-build-coqui docker-build-bark docker-build-chatterbox docker-build-exllama2
|
|
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
|
### END Backends
|
|
|
|
|
########################################################
|
|
|
|
|
|
2024-03-29 21:29:33 +00:00
|
|
|
.PHONY: swagger
|
|
|
|
|
swagger:
|
2024-04-20 23:19:57 +00:00
|
|
|
swag init -g core/http/app.go --output swagger
|
2024-05-19 16:24:27 +00:00
|
|
|
|
|
|
|
|
.PHONY: gen-assets
|
|
|
|
|
gen-assets:
|
2025-01-29 23:03:01 +00:00
|
|
|
$(GOCMD) run core/dependencies_manager/manager.go webui_static.yaml core/http/static/assets
|
2024-06-12 22:47:16 +00:00
|
|
|
|
|
|
|
|
## Documentation
|
2024-07-05 17:19:38 +00:00
|
|
|
docs/layouts/_default:
|
2024-06-12 22:47:16 +00:00
|
|
|
mkdir -p docs/layouts/_default
|
|
|
|
|
|
|
|
|
|
docs/static/gallery.html: docs/layouts/_default
|
|
|
|
|
$(GOCMD) run ./.github/ci/modelslist.go ./gallery/index.yaml > docs/static/gallery.html
|
|
|
|
|
|
|
|
|
|
docs/public: docs/layouts/_default docs/static/gallery.html
|
|
|
|
|
cd docs && hugo --minify
|
|
|
|
|
|
|
|
|
|
docs-clean:
|
|
|
|
|
rm -rf docs/public
|
|
|
|
|
rm -rf docs/static/gallery.html
|
|
|
|
|
|
|
|
|
|
.PHONY: docs
|
|
|
|
|
docs: docs/static/gallery.html
|
2024-07-05 17:19:38 +00:00
|
|
|
cd docs && hugo serve
|