feat: Update application to use port 8808 instead of 8000 in README, Dockerfile, app.py, and docker-compose.yaml

This commit is contained in:
JB
2025-10-05 16:18:05 -07:00
parent 66a0679e18
commit 1629d3e80c
5 changed files with 11 additions and 13 deletions
+5 -5
View File
@@ -23,7 +23,7 @@ pip install abogen
abogen abogen
``` ```
Then open http://localhost:8000 and drag in your documents. Jobs run in the background worker and the browser updates automatically. Then open http://localhost:8808 and drag in your documents. Jobs run in the background worker and the browser updates automatically.
> **Tip:** Keep the terminal open while the server is running. Use `Ctrl+C` to stop it. > **Tip:** Keep the terminal open while the server is running. Use `Ctrl+C` to stop it.
@@ -34,19 +34,19 @@ A lightweight Dockerfile lives in `abogen/Dockerfile`.
docker build -t abogen . docker build -t abogen .
mkdir -p ~/abogen-data/uploads ~/abogen-data/outputs mkdir -p ~/abogen-data/uploads ~/abogen-data/outputs
docker run --rm \ docker run --rm \
-p 8000:8000 \ -p 8808:8808 \
-v ~/abogen-data:/data \ -v ~/abogen-data:/data \
--name abogen \ --name abogen \
abogen abogen
``` ```
Browse to http://localhost:8000. Uploaded source files are stored in `/data/uploads` and rendered audio/subtitles appear in `/data/outputs`. Browse to http://localhost:8808. Uploaded source files are stored in `/data/uploads` and rendered audio/subtitles appear in `/data/outputs`.
### Container environment variables ### Container environment variables
| Variable | Default | Purpose | | Variable | Default | Purpose |
|----------|---------|---------| |----------|---------|---------|
| `ABOGEN_HOST` | `0.0.0.0` | Bind address for the Flask server | | `ABOGEN_HOST` | `0.0.0.0` | Bind address for the Flask server |
| `ABOGEN_PORT` | `8000` | HTTP port | | `ABOGEN_PORT` | `8808` | HTTP port |
| `ABOGEN_DEBUG` | `false` | Enable Flask debug mode | | `ABOGEN_DEBUG` | `false` | Enable Flask debug mode |
| `ABOGEN_UPLOAD_ROOT` | `/data/uploads` | Directory where uploaded files are stored | | `ABOGEN_UPLOAD_ROOT` | `/data/uploads` | Directory where uploaded files are stored |
| `ABOGEN_OUTPUT_ROOT` | `/data/outputs` | Directory for generated audio and subtitles | | `ABOGEN_OUTPUT_ROOT` | `/data/outputs` | Directory for generated audio and subtitles |
@@ -72,7 +72,7 @@ CPU-only deployment: comment out the `deploy.resources.reservations.devices` blo
docker build -f abogen/Dockerfile -t abogen-gpu . docker build -f abogen/Dockerfile -t abogen-gpu .
docker run --rm \ docker run --rm \
--gpus all \ --gpus all \
-p 8000:8000 \ -p 8808:8808 \
-v ~/abogen-data:/data \ -v ~/abogen-data:/data \
abogen-gpu abogen-gpu
``` ```
+2 -2
View File
@@ -37,9 +37,9 @@ RUN pip install --upgrade pip \
&& pip install --no-cache-dir . && pip install --no-cache-dir .
ENV ABOGEN_HOST=0.0.0.0 \ ENV ABOGEN_HOST=0.0.0.0 \
ABOGEN_PORT=8000 ABOGEN_PORT=8808
EXPOSE 8000 EXPOSE 8808
VOLUME ["/data"] VOLUME ["/data"]
+1 -1
View File
@@ -68,7 +68,7 @@ def create_app(config: Optional[dict[str, Any]] = None) -> Flask:
def main() -> None: def main() -> None:
app = create_app() app = create_app()
host = os.environ.get("ABOGEN_HOST", "0.0.0.0") host = os.environ.get("ABOGEN_HOST", "0.0.0.0")
port = int(os.environ.get("ABOGEN_PORT", "8000")) port = int(os.environ.get("ABOGEN_PORT", "8808"))
debug = os.environ.get("ABOGEN_DEBUG", "false").lower() == "true" debug = os.environ.get("ABOGEN_DEBUG", "false").lower() == "true"
app.run(host=host, port=port, debug=debug) app.run(host=host, port=port, debug=debug)
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}abogen{% endblock %}</title> <title>{% block title %}abogen{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('web.static', filename='styles.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<script src="https://unpkg.com/htmx.org@2.0.3"></script> <script src="https://unpkg.com/htmx.org@2.0.3"></script>
<script src="https://unpkg.com/hyperscript.org@0.9.12"></script> <script src="https://unpkg.com/hyperscript.org@0.9.12"></script>
</head> </head>
+2 -4
View File
@@ -1,5 +1,3 @@
version: "3.9"
services: services:
abogen: abogen:
build: build:
@@ -10,12 +8,12 @@ services:
TORCH_VERSION: ${TORCH_VERSION:-} TORCH_VERSION: ${TORCH_VERSION:-}
image: abogen:latest image: abogen:latest
ports: ports:
- "${ABOGEN_PORT:-8000}:8000" - "${ABOGEN_PORT:-8808}:8808"
volumes: volumes:
- ${ABOGEN_DATA:-./data}:/data - ${ABOGEN_DATA:-./data}:/data
environment: environment:
ABOGEN_HOST: 0.0.0.0 ABOGEN_HOST: 0.0.0.0
ABOGEN_PORT: 8000 ABOGEN_PORT: 8808
ABOGEN_UPLOAD_ROOT: /data/uploads ABOGEN_UPLOAD_ROOT: /data/uploads
ABOGEN_OUTPUT_ROOT: /data/outputs ABOGEN_OUTPUT_ROOT: /data/outputs
# --- GPU support ----------------------------------------------------- # --- GPU support -----------------------------------------------------