fix model downloads and local dockerfile builds #169
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using the project's
docker-compose.ymland.env.examplefiles, I got this error downloading models:I noticed in faster-whisper.py that
local_files_only=Truewas in a try/except. However, from what I can tell, an exception is never thrown here and we do not fall back tolocal_files_only=Falseas expected. My fix was to just remove the try/except altogether. This fixed model downloads for me. I am now able to edit.envto select whatever model I want and it will get downloadedIn order to use my patch here, I decided to try building the Dockerfile locally so I could include my patched version in the
docker-compose.yml. However, I ran into build errors. My fork here I am trying to merge also fixes those. The commits should tell most of what changedI updated faster-whisper because I couldnt get the pinned version to build with the rest of the deps. Using a later version and adding the requests library to requirements.txt seemed to fix the issue. I also pinned all the python dep versions in hopes that future Dockerfile builds are less likely to break
Also updated the default docker-compose.yml to also mount the /app/models dir so it's easy to tell which models are downloaded and persist these downloads between container creation/removal
Overall this PR just tries to get a minimal working example without changing too much. Should fix #92 and #155