mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
feat: Add UID/GID configuration to .env.example and update README for container user settings
This commit is contained in:
@@ -4,3 +4,10 @@
|
||||
ABOGEN_SETTINGS_DIR=./config
|
||||
ABOGEN_TEMP_DIR=./storage/tmp
|
||||
ABOGEN_OUTPUT_DIR=./storage/output
|
||||
|
||||
# UID/GID used when running the Docker container. 1000:1000 matches most Linux hosts.
|
||||
# Find your current values with:
|
||||
# id -u # UID
|
||||
# id -g # GID
|
||||
ABOGEN_UID=1000
|
||||
ABOGEN_GID=1000
|
||||
|
||||
@@ -50,12 +50,23 @@ Browse to http://localhost:8808. Uploaded source files are stored in `/data/uplo
|
||||
| `ABOGEN_DEBUG` | `false` | Enable Flask debug mode |
|
||||
| `ABOGEN_UPLOAD_ROOT` | `/data/uploads` | Directory where uploaded files are stored |
|
||||
| `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_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 |
|
||||
|
||||
Set any of these with `-e VAR=value` when starting the container.
|
||||
|
||||
To discover your local UID/GID for matching file permissions inside the container, run:
|
||||
|
||||
```bash
|
||||
id -u
|
||||
id -g
|
||||
```
|
||||
|
||||
Use those values to populate `ABOGEN_UID` / `ABOGEN_GID` in your `.env` file.
|
||||
|
||||
### 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:
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ services:
|
||||
TORCH_INDEX_URL: ${TORCH_INDEX_URL:-https://download.pytorch.org/whl/cu124}
|
||||
TORCH_VERSION: ${TORCH_VERSION:-}
|
||||
image: abogen:latest
|
||||
user: "${ABOGEN_UID:-1000}:${ABOGEN_GID:-1000}"
|
||||
ports:
|
||||
- "${ABOGEN_PORT:-8808}:8808"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user