feat: Add XTTS v2 support, refactor Docker/GPU infra, and improve Piper engine
- Add XTTS v2 configuration to .env.example - Refactor Dockerfile to multi-stage build with CUDA 12.1 support - Update Makefile with Kokoro and XTTS test environment targets - Refactor Piper engine (app/engines/piper.py) to use python module execution - Add comprehensive documentation for Kokoro and XTTS plans - Add helper scripts and patches for build process
This commit is contained in:
134
Makefile
134
Makefile
@ -36,7 +36,7 @@ endef
|
||||
.PHONY: build
|
||||
build:
|
||||
@echo "Building Docker image: $(IMAGE_NAME):$(TAG)"
|
||||
docker build -t $(IMAGE_NAME):$(TAG) .
|
||||
docker build --no-cache -t $(IMAGE_NAME):$(TAG) .
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
@ -92,6 +92,54 @@ down:
|
||||
export TAG=$(TAG) && \
|
||||
docker compose down
|
||||
|
||||
# --- Test Environment Commands ---
|
||||
|
||||
.PHONY: kokoro-up
|
||||
kokoro-up:
|
||||
@echo "Starting Kokoro test environment on port 8001..."
|
||||
export IMAGE_NAME=$(IMAGE_NAME) && \
|
||||
export REGISTRY=$(REGISTRY) && \
|
||||
export USERNAME=$(USERNAME) && \
|
||||
export TAG=dev-kokoro-v5 && \
|
||||
docker compose -f docker-compose.kokoro-test.yml up -d
|
||||
|
||||
.PHONY: kokoro-down
|
||||
kokoro-down:
|
||||
@echo "Stopping Kokoro test environment..."
|
||||
export IMAGE_NAME=$(IMAGE_NAME) && \
|
||||
export REGISTRY=$(REGISTRY) && \
|
||||
export USERNAME=$(USERNAME) && \
|
||||
export TAG=dev-kokoro-v5 && \
|
||||
docker compose -f docker-compose.kokoro-test.yml down
|
||||
|
||||
.PHONY: kokoro-logs
|
||||
kokoro-logs:
|
||||
@echo "Showing logs for Kokoro test container..."
|
||||
docker logs -f audio-engine-hub_kokoro_test
|
||||
|
||||
.PHONY: xtts-up
|
||||
xtts-up:
|
||||
@echo "Starting XTTS test environment on port 8002..."
|
||||
export IMAGE_NAME=$(IMAGE_NAME) && \
|
||||
export REGISTRY=$(REGISTRY) && \
|
||||
export USERNAME=$(USERNAME) && \
|
||||
export TAG=dev-xtts && \
|
||||
docker compose -f docker-compose.xtts-test.yml up -d
|
||||
|
||||
.PHONY: xtts-down
|
||||
xtts-down:
|
||||
@echo "Stopping XTTS test environment..."
|
||||
export IMAGE_NAME=$(IMAGE_NAME) && \
|
||||
export REGISTRY=$(REGISTRY) && \
|
||||
export USERNAME=$(USERNAME) && \
|
||||
export TAG=dev-xtts && \
|
||||
docker compose -f docker-compose.xtts-test.yml down
|
||||
|
||||
.PHONY: xtts-logs
|
||||
xtts-logs:
|
||||
@echo "Showing logs for XTTS test container..."
|
||||
docker logs -f audio-engine-hub_xtts_test
|
||||
|
||||
# --- Image Management ---
|
||||
|
||||
.PHONY: pull
|
||||
@ -109,6 +157,40 @@ push: build tag
|
||||
@echo "Pushing image $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):$(TAG) to registry..."
|
||||
docker push $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):$(TAG)
|
||||
|
||||
# --- Tagged Image Management ---
|
||||
|
||||
.PHONY: build-kokoro
|
||||
build-kokoro:
|
||||
@echo "Building Kokoro test image: $(IMAGE_NAME):dev-kokoro-v5"
|
||||
docker build --no-cache -t $(IMAGE_NAME):dev-kokoro-v5 .
|
||||
docker tag $(IMAGE_NAME):dev-kokoro-v5 $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-kokoro-v5
|
||||
|
||||
.PHONY: push-kokoro
|
||||
push-kokoro: build-kokoro
|
||||
@echo "Pushing Kokoro test image to registry..."
|
||||
docker push $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-kokoro-v5
|
||||
|
||||
.PHONY: pull-kokoro
|
||||
pull-kokoro:
|
||||
@echo "Pulling Kokoro test image from registry..."
|
||||
docker pull $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-kokoro-v5
|
||||
|
||||
.PHONY: build-xtts
|
||||
build-xtts:
|
||||
@echo "Building XTTS test image: $(IMAGE_NAME):dev-xtts"
|
||||
docker build --no-cache -t $(IMAGE_NAME):dev-xtts .
|
||||
docker tag $(IMAGE_NAME):dev-xtts $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-xtts
|
||||
|
||||
.PHONY: push-xtts
|
||||
push-xtts: build-xtts
|
||||
@echo "Pushing XTTS test image to registry..."
|
||||
docker push $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-xtts
|
||||
|
||||
.PHONY: pull-xtts
|
||||
pull-xtts:
|
||||
@echo "Pulling XTTS test image from registry..."
|
||||
docker pull $(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):dev-xtts
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@if [ -d ".venv" ]; then \
|
||||
@ -148,20 +230,42 @@ clean:
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " build - Build the Docker image"
|
||||
@echo " run - Run the Docker container (single app, no Traefik)"
|
||||
@echo " stop - Stop and remove the Docker container"
|
||||
@echo " logs - Follow the logs of the container"
|
||||
@echo " shell - Get a shell inside the running container"
|
||||
@echo " up - Start the dev environment by pulling image from registry"
|
||||
@echo " dev-up - Start the dev environment by building image locally"
|
||||
@echo " down - Stop the dev environment with docker-compose"
|
||||
@echo " pull - Pull the Docker image from the registry"
|
||||
@echo " tag - Tag the image for a registry"
|
||||
@echo " push - Push the image to a registry (after tagging)"
|
||||
@echo " test - Run the pytest test suite"
|
||||
@echo ""
|
||||
@echo "Main Deployment:"
|
||||
@echo " build - Build the Docker image"
|
||||
@echo " run - Run the Docker container (single app, no Traefik)"
|
||||
@echo " stop - Stop and remove the Docker container"
|
||||
@echo " logs - Follow the logs of the container"
|
||||
@echo " shell - Get a shell inside the running container"
|
||||
@echo " up - Start the dev environment by pulling image from registry"
|
||||
@echo " dev-up - Start the dev environment by building image locally"
|
||||
@echo " down - Stop the dev environment with docker-compose"
|
||||
@echo ""
|
||||
@echo "Test Environments:"
|
||||
@echo " kokoro-up - Start Kokoro test environment (port 8001)"
|
||||
@echo " kokoro-down - Stop Kokoro test environment"
|
||||
@echo " kokoro-logs - View Kokoro test container logs"
|
||||
@echo " xtts-up - Start XTTS test environment (port 8002)"
|
||||
@echo " xtts-down - Stop XTTS test environment"
|
||||
@echo " xtts-logs - View XTTS test container logs"
|
||||
@echo ""
|
||||
@echo "Image Management (main 'latest' tag):"
|
||||
@echo " pull - Pull the Docker image from the registry"
|
||||
@echo " tag - Tag the image for a registry"
|
||||
@echo " push - Push the image to a registry (after tagging)"
|
||||
@echo ""
|
||||
@echo "Image Management (test tags):"
|
||||
@echo " build-kokoro - Build Kokoro test image (dev-kokoro-v5 tag)"
|
||||
@echo " push-kokoro - Build and push Kokoro test image to registry"
|
||||
@echo " pull-kokoro - Pull Kokoro test image from registry"
|
||||
@echo " build-xtts - Build XTTS test image (dev-xtts tag)"
|
||||
@echo " push-xtts - Build and push XTTS test image to registry"
|
||||
@echo " pull-xtts - Pull XTTS test image from registry"
|
||||
@echo ""
|
||||
@echo "Testing & Maintenance:"
|
||||
@echo " test - Run the pytest test suite"
|
||||
@echo " health-check - Run a sanity check on the deployed container"
|
||||
@echo " clean - Clean up unused containers and images"
|
||||
@echo " help - Show this help message"
|
||||
@echo " clean - Clean up unused containers and images"
|
||||
@echo " help - Show this help message"
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
Reference in New Issue
Block a user