What is best option to use libretranslate in flask app + aws

Hello everyone,

Currently, we’ve installed argostranslate==1.9.6 in our Flask app and deployed it to AWS ECS. However, this package is 15GB in size, which makes the build process very slow. I’m looking for alternative options that are more lightweight and free. From what I understand, the options involving installing the package and using a Docker image seem to be the most suitable, correct?

If that’s the case:

  1. Are there any opportunities to reduce the size of the argostranslate package, such as removing unnecessary libraries (e.g., nvidia, torch, etc.)?
  2. From my research, the image is around 3.5GB. Is there a way to optimize it?

What recommendations can you offer to make the build process faster while still using a argostranslate library?

Are you including the model weights in the 15GB? If you don’t need all of the languages you can save space by only downloading the ones you need.

The LibreTranslate Docker image doesn’t include the model weights.

2 Likes

what do you mean by “model weights”? I’ve already installed only english and german, however this package with its all dependencies - is about 15 GB. Is there some ways to avoid installing torch, for example? But I wasn’t aware about customizing. Could you, pls, refer me to the topics, where I can get information how I can do it?

1 Like