Skip to content

Commit

Permalink
Update cache folder usage, Fixes #138
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetoner committed Oct 3, 2023
1 parent 8ed32c6 commit 7484ee9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Unreleased
### Updated

- Updated model conversion method (for Faster Whisper) to use Hugging Face downloader
- Updated default model paths to `~/.cache/whisper`.
- Updated default model paths to `~/.cache/whisper` or `/root/.cache/whisper`.
- For customization, modify the `ASR_MODEL_PATH` environment variable.
- Ensure Docker volume is set for the corresponding directory to use caching.
```bash
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- ./app:/app/app
- cache-pip:/root/.cache/pip
- cache-poetry:/root/.cache/poetry
- cache-whisper:~/.cache/whisper
- cache-whisper:/root/.cache/whisper

volumes:
cache-pip:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- ./app:/app/app
- cache-pip:/root/.cache/pip
- cache-poetry:/root/.cache/poetry
- cache-whisper:~/.cache/whisper
- cache-whisper:/root/.cache/whisper

volumes:
cache-pip:
Expand Down
4 changes: 2 additions & 2 deletions docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Docker Hub: <https://hub.docker.com/r/onerahmet/openai-whisper-asr-webservice>

## Cache
The ASR model is downloaded each time you start the container, using the large model this can take some time.
If you want to decrease the time it takes to start your container by skipping the download, you can store the cache directory (`~/.cache/whisper`) to a persistent storage.
If you want to decrease the time it takes to start your container by skipping the download, you can store the cache directory (`~/.cache/whisper` or `/root/.cache/whisper`) to a persistent storage.
Next time you start your container the ASR Model will be taken from the cache instead of being downloaded again.

**Important this will prevent you from receiving any updates to the models.**

=== ":octicons-file-code-16: `Default cache dir`"

```sh
docker run -d -p 9000:9000 -v ./yourlocaldir:~/.cache/whisper onerahmet/openai-whisper-asr-webservice:latest
docker run -d -p 9000:9000 -v ./yourlocaldir:/root/.cache/whisper onerahmet/openai-whisper-asr-webservice:latest
```

=== ":octicons-file-code-16: `With ASR_MODEL_PATH`"
Expand Down

0 comments on commit 7484ee9

Please sign in to comment.