Skip to content

Commit

Permalink
Merge pull request #242 from jhj0517/feauter/add-compose
Browse files Browse the repository at this point in the history
Add docker-compose
  • Loading branch information
jhj0517 authored Aug 25, 2024
2 parents d25d786 + a6c2eab commit 8599e68
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 18 deletions.
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,28 @@ And you can also run the project with command line arguments if you like to, see

- ## Running with Docker

1. Build the image
1. Git clone the repository

```sh
docker build -t whisper-webui:latest .
git clone https://github.com/jhj0517/Whisper-WebUI.git
```

2. Run the container with commands
2. Build the image ( Image is about 7GB~ )

- For bash :
```sh
docker run --gpus all -d \
-v /path/to/models:/Whisper-WebUI/models \
-v /path/to/outputs:/Whisper-WebUI/outputs \
-p 7860:7860 \
-it \
whisper-webui:latest --server_name 0.0.0.0 --server_port 7860
docker compose build
```
- For PowerShell:
```shell
docker run --gpus all -d `
-v /path/to/models:/Whisper-WebUI/models `
-v /path/to/outputs:/Whisper-WebUI/outputs `
-p 7860:7860 `
-it `
whisper-webui:latest --server_name 0.0.0.0 --server_port 7860

3. Run the container

```sh
docker compose up
```

4. Connect to the WebUI with your browser at `http://localhost:7860`

If needed, update the [`docker-compose.yaml`](https://github.com/jhj0517/Whisper-WebUI/blob/feauter/add-compose/docker-compose.yaml) to match your environment.

# VRAM Usages
This project is integrated with [faster-whisper](https://github.com/guillaumekln/faster-whisper) by default for better VRAM usage and transcription speed.

Expand Down
31 changes: 31 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3.8'

services:
app:
build: .
image: jhj0517/whisper-webui:latest

volumes:
# Update paths to mount models and output paths to your custom paths like this, e.g:
# - C:/whisper-models/custom-path:/sam2-playground/models
# - C:/whisper-webui-outputs/custom-path:/sam2-playground/outputs
- /Whisper-WebUI/models
- /Whisper-WebUI/outputs

ports:
- "7860:7860"

stdin_open: true
tty: true

entrypoint: ["python", "app.py", "--server_port", "7860", "--server_name", "0.0.0.0",]

# If you're not using nvidia GPU, Update device to match yours.
# See more info at : https://docs.docker.com/compose/compose-file/deploy/#driver
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]

0 comments on commit 8599e68

Please sign in to comment.