Add Docker image support

This commit is contained in:
2026-05-22 20:24:58 +01:00
parent f4f1236777
commit 82d5c3c173
5 changed files with 80 additions and 1 deletions

View File

@@ -76,6 +76,31 @@ Gradio provides a local browser UI for starting dub jobs, watching logs, and dow
Open `http://127.0.0.1:7860` and submit a YouTube URL. Jobs run through the same `main.py` pipeline, so the CLI options and environment variables still apply.
### Docker
Build and run the Gradio UI in a container:
```powershell
docker build -t youtube-auto-dub:gradio .
docker run --rm -p 7860:7860 `
-e LM_STUDIO_BASE_URL=http://host.docker.internal:1234/v1 `
-e LM_STUDIO_API_KEY=lm-studio `
-e LM_STUDIO_MODEL=gemma-3-4b-it `
-v ${PWD}\.cache:/app/.cache `
-v ${PWD}\output:/app/output `
-v ${PWD}\logs:/app/logs `
-v ${PWD}\temp:/app/temp `
youtube-auto-dub:gradio
```
Or use Compose:
```powershell
docker compose up --build
```
When LM Studio runs on the host machine, use `http://host.docker.internal:1234/v1` from inside Docker instead of `http://127.0.0.1:1234/v1`.
Override the LM Studio endpoint or model from the CLI:
```powershell