chore: add docker-compose.yml

This commit is contained in:
Brandon Barker
2024-12-27 15:02:14 +02:00
parent 02aa6f3d0c
commit e9b3b0ef70
2 changed files with 47 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ Use this tool responsibly and in accordance with all applicable laws.
- [Headless Custom XTTS Model Usage](#headless-custom-xtts-model-usage)
- [For Collection of Fine-Tuned TTS Models](#fine-tuned-tts-models)
- [Using Docker](#using-docker)
- [Docker Compose](#docker-compose)
- [Supported eBook Formats](#supported-ebook-formats)
- [Output](#output)
- [Common Issues](#common-issues)
@@ -344,6 +345,29 @@ Linux/Mac:
```
</details>
### Docker Compose
This project uses Docker Compose to run locally. You can enable or disable GPU support by setting either `*gpu-enabled` or `*gpu-disabled` in `docker-compose.yml`
#### Steps to Run
1. **Clone the Repository** (if you haven't already):
```bash
git clone https://github.com/DrewThomasson/ebook2audiobook.git
cd ebook2audiobook
```
2. **Set GPU Support (disabled by default)**
To enable GPU support, modify `docker-compose.yml` and change `*gpu-disabled` to `*gpu-enabled`
3. **Start the service:**
```bash
docker-compose up -d
```
4. **Access the service:**
The service will be available at http://localhost:7860.
#### New v2.0 Docker Web GUI Interface!
![demo_web_gui](assets/demo_web_gui.gif)

23
docker-compose.yml Normal file
View File

@@ -0,0 +1,23 @@
x-gpu-enabled: &gpu-enabled
devices:
- driver: nvidia
count: all
capabilities:
- gpu
x-gpu-disabled: &gpu-disabled
devices: []
services:
ebook2audiobookxtts:
image: athomasson2/ebook2audiobookxtts:huggingface
platform: linux/amd64
tty: true
stdin_open: true
ports:
- 7860:7860
command: python app.py
deploy:
resources:
reservations:
<<: *gpu-disabled # change this to gpu-enabled if you have an NVIDIA gpu