mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
feat: Update environment configuration for Docker to include temporary directory settings
This commit is contained in:
+6
-1
@@ -2,9 +2,14 @@
|
||||
# Relative paths are resolved from the repository root when running locally.
|
||||
|
||||
ABOGEN_SETTINGS_DIR=./config
|
||||
ABOGEN_TEMP_DIR=./storage/tmp
|
||||
ABOGEN_OUTPUT_DIR=./storage/output
|
||||
|
||||
# Temporary working directory. When running in Docker, keep this inside the
|
||||
# mounted /data volume so non-root users can write to it. For local (non-Docker)
|
||||
# usage, change this to a path that makes sense on your machine or comment it out
|
||||
# to fall back to the OS cache directory.
|
||||
ABOGEN_TEMP_DIR=/data/cache
|
||||
|
||||
# UID/GID used when running the Docker container. 1000:1000 matches most Linux hosts.
|
||||
# Find your current values with:
|
||||
# id -u # UID
|
||||
|
||||
@@ -52,7 +52,7 @@ Browse to http://localhost:8808. Uploaded source files are stored in `/data/uplo
|
||||
| `ABOGEN_OUTPUT_ROOT` | `/data/outputs` | Directory for generated audio and subtitles |
|
||||
| `ABOGEN_UID` | `1000` | UID that the container should run as (matches host user) |
|
||||
| `ABOGEN_GID` | `1000` | GID that the container should run as (matches host group) |
|
||||
| `ABOGEN_TEMP_DIR` | Platform cache dir (e.g. `~/.cache/abogen`) | Override the cache/temp directory |
|
||||
| `ABOGEN_TEMP_DIR` | `/data/cache` (Docker) or platform cache dir | Override the cache/temp directory |
|
||||
| `ABOGEN_OUTPUT_DIR` | Same as `ABOGEN_OUTPUT_ROOT` | Override the rendered output directory |
|
||||
| `ABOGEN_SETTINGS_DIR` | Platform config dir (e.g. `~/.config/abogen`) | Override where JSON settings (profiles, config) are stored |
|
||||
|
||||
@@ -67,6 +67,10 @@ id -g
|
||||
|
||||
Use those values to populate `ABOGEN_UID` / `ABOGEN_GID` in your `.env` file.
|
||||
|
||||
When running via Docker Compose, the container defaults to `/data/cache` for
|
||||
temporary files. Make sure the corresponding host directory is writable (the
|
||||
compose volume at `${ABOGEN_DATA:-./data}` will automatically satisfy this).
|
||||
|
||||
### Docker Compose (GPU by default)
|
||||
The repo includes `docker-compose.yaml`, which targets GPU hosts out of the box. Install the NVIDIA Container Toolkit and run:
|
||||
|
||||
|
||||
+3
-2
@@ -44,8 +44,9 @@ EXPOSE 8808
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENV ABOGEN_UPLOAD_ROOT=/data/uploads \
|
||||
ABOGEN_OUTPUT_ROOT=/data/outputs
|
||||
ABOGEN_OUTPUT_ROOT=/data/outputs \
|
||||
ABOGEN_TEMP_DIR=/data/cache
|
||||
|
||||
RUN mkdir -p /data/uploads /data/outputs
|
||||
RUN mkdir -p /data/uploads /data/outputs /data/cache
|
||||
|
||||
CMD ["abogen"]
|
||||
|
||||
@@ -17,6 +17,7 @@ services:
|
||||
ABOGEN_PORT: 8808
|
||||
ABOGEN_UPLOAD_ROOT: /data/uploads
|
||||
ABOGEN_OUTPUT_ROOT: /data/outputs
|
||||
ABOGEN_TEMP_DIR: "${ABOGEN_TEMP_DIR:-/data/cache}"
|
||||
# --- GPU support -----------------------------------------------------
|
||||
# These settings assume the NVIDIA Container Toolkit is installed.
|
||||
# Leave them in place for GPU acceleration; comment out the entire block
|
||||
|
||||
Reference in New Issue
Block a user