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 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"]