Save downloaded models in Docker

Do we have an example Dockerfile for saving downloaded models? We could put this in the default Docker example since most people will want to avoid redownloading on every Docker run.

In the README we actually already recommend people use run.sh (https://github.com/LibreTranslate/LibreTranslate/blob/main/run.sh) (and run.bat on Windows) which take care of saving the models to a permanent storage location when running with docker.

1 Like

check this: Only download specific language models? - #4 by argosopentech

according to that info, you could mount a volume to have the downloads persist?

    volumes:                                                                                                                                        
      - ./data/argos-translate:/home/libretranslate/.local/share/argos-translate

I’m just not sure how frequently those change, i.e. does it make sense to persist the models?

1 Like

The models change pretty infrequently so in most cases it’s probably fine to just download and leave them. I’m currently working on functionality to upgrade only the models that have newer versions.

4 Likes

Hello, I would like to manually download all language packs. Can you please send me an address? Thank you very much