Failing to download packages seems like a common issue we’re having. I’m looking at adding retry logic to Argos Translate but we can also consider adding this type of functionality to LibreTranslate.
I use the standard library to download packages in Argos Translate to reduce dependencies but LibreTranslate already includes requests and we may have better results using it. The Argos Translate packaging code should be modular enough that you can get package paths from the index, download them manually, and then install them with Argos Translate.
I’ve noticed this issue with digital ocean spaces in the past (the download ends up being corrupted sometimes). Retries are always needed in my experience with DO spaces.
Another way to deal with this, more simply, could be to load the models to a droplet with static nginx or apache2. You won’t have the the CDN out of the box (it can be outsourced to cloudflare), but downloads should be way more reliable.
I’m also experimenting with setting up a CDN using Cloudfare pointing to an Apache server at cdn.argosopentech.io, it mostly works but I’m getting 403 Forbidden errors when trying to download from Python.
Cloudfare seems like a really good deal for CDN caching, on the free plan you get effectively unlimited bandwidth.
I added load balancing to Argos Translate, we will now try to download from the list of available urls in a random order. This should make the downloads more robust in case the primary CDN goes down and spread the load over multiple sources.
Great! I tried it and it seems to have solved the model download problems that were happening a few times (especially thanks to the addition of the retry i think).
I’m going to see if I can make a progress bar for the download of the models in CLI, it would be useful I think because when you download all the models (58) there is no indication of the estimated remaining time
Could you release a new version of argos on pypi so that we can use it in libretranslate? there have been quite a few updates to ctranslate2 as well which add support for architectures etc.
I released Argos Translate 1.7.0 on PyPI with CTranslate2 updates and download retries.
People can now mirror or submit their own packages by making a pull request to argospm-index and Argos Translate will randomly distribute the downloads over the available links.