Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cinderisles
Copy link

@cinderisles cinderisles commented Oct 30, 2025

Using the project's docker-compose.yml and .env.example files, I got this error downloading models:

An error occured while synchronizing the model Systran/faster-whisper-small from the Hugging Face Hub: Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.

I noticed in faster-whisper.py that local_files_only=True was in a try/except. However, from what I can tell, an exception is never thrown here and we do not fall back to local_files_only=False as expected. My fix was to just remove the try/except altogether. This fixed model downloads for me. I am now able to edit .env to select whatever model I want and it will get downloaded

In 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 changed

I 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

setting local_files_only=True does not throw an exception so it never falls back to downloading. it just produces a warning then does nothing. removing the try/except here will handle auto-downloads if the model doesn't exist
the version of pnpm installed by corepack on nodejs 22 is incompatible with the pnpm lockfile currently in the project. regen the lockfile to support a later pnpm version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An error occurred while synchronising the Systran/faster-whisper-tiny model from the Hugging Face Hub

1 participant