mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 22:08:13 -05:00
43 lines
2.2 KiB
YAML
43 lines
2.2 KiB
YAML
x-gpu-enabled: &gpu-enabled
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities:
|
|
- gpu # Enables GPU access for the container.
|
|
|
|
x-gpu-disabled: &gpu-disabled
|
|
devices: [] # Disables GPU access (default for systems without an NVIDIA GPU).
|
|
|
|
services:
|
|
ebook2audiobook:
|
|
build:
|
|
context: .
|
|
args:
|
|
#TORCH_VERSION: cuda118 # Available tags: [cuda121, cuda118, cuda128, rocm, xpu, cpu] # All CUDA version numbers should work, Ex: CUDA 11.6-> cuda116
|
|
SKIP_XTTS_TEST: "true" # (Saves space by not baking xtts model into docker image)
|
|
# To update ebook2audiobook to the latest you may have to rebuild
|
|
entrypoint: ["python", "app.py", "--script_mode", "full_docker"]
|
|
command: [] # <- Extra ebook2audiobook parameters can be added here
|
|
# The dir containing this docker-compose.yml file will be used as the base directory for any commands.
|
|
# Example Headless || command: ["--headless", "--ebook", "The-Tell-Tale-Heart.epub", "--tts_engine", "yourtts"] # "The-Tell-Tale-Heart.epub" file is located in the same dir as this docker-compose.yml. # More compose headless info can be found at wiki "https://github.com/DrewThomasson/ebook2audiobook/wiki/Docker-Compose-Headless-guide"
|
|
tty: true
|
|
stdin_open: true
|
|
ports:
|
|
- 7860:7860 # Maps container's port 7860 to the host's port 7860.
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
<<: *gpu-disabled # Use *gpu-enabled if you have an NVIDIA GPU.
|
|
limits: {} # Keeps limits as an empty mapping to avoid errors. Uncomment and configure below.
|
|
volumes:
|
|
- ./:/app # Maps the local directory to the container.
|
|
|
|
# Common Issues: ----
|
|
# --> `python: can't open file '/home/user/app/app.py': [Errno 2] No such file or directory`
|
|
# Removed all post arguments as CMD was replaced with ENTRYPOINT in the Dockerfile
|
|
# Example correction:
|
|
# Before: command: ["python", "app.py", "--script_mode", "full_docker"] or -> `docker run athomasson2/ebook2audiobook python app.py --script_mode full_docker`
|
|
# After: nothing needed or just -> `docker run athomasson2/ebook2audiobook`
|
|
# Extra arguments after app.py can still be added to the -> command: []
|
|
# Example adding extra arguments -> command: ["--share"] or -> command: ["--help"]
|