Skip to content

Commit d76b8c2

Browse files
committed
Support local-only mode
1 parent f79718a commit d76b8c2

6 files changed

Lines changed: 8 additions & 3 deletions

File tree

.editorconfig

100755100644
File mode changed.

LICENSE

100755100644
File mode changed.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ services:
9494
- PGID=1000
9595
- TZ=Etc/UTC
9696
- WHISPER_MODEL=tiny-int8
97+
- LOCAL_ONLY= #optional
9798
- WHISPER_BEAM=1 #optional
9899
- WHISPER_LANG=en #optional
99100
volumes:
@@ -112,6 +113,7 @@ docker run -d \
112113
-e PGID=1000 \
113114
-e TZ=Etc/UTC \
114115
-e WHISPER_MODEL=tiny-int8 \
116+
-e LOCAL_ONLY= `#optional` \
115117
-e WHISPER_BEAM=1 `#optional` \
116118
-e WHISPER_LANG=en `#optional` \
117119
-p 10300:10300 \
@@ -131,6 +133,7 @@ Containers are configured using parameters passed at runtime (such as those abov
131133
| `-e PGID=1000` | for GroupID - see below for explanation |
132134
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
133135
| `-e WHISPER_MODEL=tiny-int8` | Whisper model that will be used for transcription. From `tiny`, `base`, `small` and `medium`, all with `-int8` compressed variants |
136+
| `-e LOCAL_ONLY=` | If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models. |
134137
| `-e WHISPER_BEAM=1` | Number of candidates to consider simultaneously during transcription. |
135138
| `-e WHISPER_LANG=en` | Language that you will speak to the add-on. |
136139
| `-v /config` | Local path for Whisper config files. |
@@ -298,6 +301,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
298301

299302
## Versions
300303

304+
* **10.08.25:** - Add support for local-only mode.
301305
* **05.12.24:** - Build from Github releases rather than Pypi.
302306
* **18.07.24:** - Rebase to Ubuntu Noble.
303307
* **19.05.24:** - Bump CUDA to 12 on GPU branch.

jenkins-vars.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ external_type: github_stable
66
release_type: prerelease
77
release_tag: gpu
88
ls_branch: gpu
9-
image_sbom: true
10-
image_provenance: true
119
repo_vars:
1210
- EXT_GIT_BRANCH = 'master'
1311
- EXT_USER = 'rhasspy'

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ param_ports:
2929
# optional container parameters
3030
opt_param_usage_include_env: true
3131
opt_param_env_vars:
32+
- {env_var: "LOCAL_ONLY", env_value: "", desc: "If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models."}
3233
- {env_var: "WHISPER_BEAM", env_value: "1", desc: "Number of candidates to consider simultaneously during transcription."}
3334
- {env_var: "WHISPER_LANG", env_value: "en", desc: "Language that you will speak to the add-on."}
3435
readonly_supported: true
@@ -83,6 +84,7 @@ init_diagram: |
8384
"faster-whisper:gpu" <- Base Images
8485
# changelog
8586
changelogs:
87+
- {date: "10.08.25:", desc: "Add support for local-only mode."}
8688
- {date: "05.12.24:", desc: "Build from Github releases rather than Pypi."}
8789
- {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."}
8890
- {date: "19.05.24:", desc: "Bump CUDA to 12 on GPU branch."}

root/etc/s6-overlay/s6-rc.d/svc-whisper/run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ exec \
1212
--beam-size "${WHISPER_BEAM:-1}" \
1313
--language "${WHISPER_LANG:-en}" \
1414
--data-dir /config \
15-
--download-dir /config
15+
--download-dir /config \
16+
${LOCAL_ONLY:+--local-files-only}

0 commit comments

Comments
 (0)