mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
feat: Update application to use port 8808 instead of 8000 in README, Dockerfile, app.py, and docker-compose.yaml
This commit is contained in:
@@ -23,7 +23,7 @@ pip install 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.
|
||||
|
||||
@@ -34,19 +34,19 @@ A lightweight Dockerfile lives in `abogen/Dockerfile`.
|
||||
docker build -t abogen .
|
||||
mkdir -p ~/abogen-data/uploads ~/abogen-data/outputs
|
||||
docker run --rm \
|
||||
-p 8000:8000 \
|
||||
-p 8808:8808 \
|
||||
-v ~/abogen-data:/data \
|
||||
--name 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
|
||||
| Variable | Default | Purpose |
|
||||
|----------|---------|---------|
|
||||
| `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_UPLOAD_ROOT` | `/data/uploads` | Directory where uploaded files are stored |
|
||||
| `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 run --rm \
|
||||
--gpus all \
|
||||
-p 8000:8000 \
|
||||
-p 8808:8808 \
|
||||
-v ~/abogen-data:/data \
|
||||
abogen-gpu
|
||||
```
|
||||
|
||||
+2
-2
@@ -37,9 +37,9 @@ RUN pip install --upgrade pip \
|
||||
&& pip install --no-cache-dir .
|
||||
|
||||
ENV ABOGEN_HOST=0.0.0.0 \
|
||||
ABOGEN_PORT=8000
|
||||
ABOGEN_PORT=8808
|
||||
|
||||
EXPOSE 8000
|
||||
EXPOSE 8808
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ def create_app(config: Optional[dict[str, Any]] = None) -> Flask:
|
||||
def main() -> None:
|
||||
app = create_app()
|
||||
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"
|
||||
app.run(host=host, port=port, debug=debug)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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/hyperscript.org@0.9.12"></script>
|
||||
</head>
|
||||
|
||||
+2
-4
@@ -1,5 +1,3 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
abogen:
|
||||
build:
|
||||
@@ -10,12 +8,12 @@ services:
|
||||
TORCH_VERSION: ${TORCH_VERSION:-}
|
||||
image: abogen:latest
|
||||
ports:
|
||||
- "${ABOGEN_PORT:-8000}:8000"
|
||||
- "${ABOGEN_PORT:-8808}:8808"
|
||||
volumes:
|
||||
- ${ABOGEN_DATA:-./data}:/data
|
||||
environment:
|
||||
ABOGEN_HOST: 0.0.0.0
|
||||
ABOGEN_PORT: 8000
|
||||
ABOGEN_PORT: 8808
|
||||
ABOGEN_UPLOAD_ROOT: /data/uploads
|
||||
ABOGEN_OUTPUT_ROOT: /data/outputs
|
||||
# --- GPU support -----------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user