[LibreTranslate] Free and Open Source Machine Translation API

Integration level Working status Maintenance status

Install LibreTranslate with YunoHost

Overview

Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn’t rely on proprietary providers such as Google or Azure to perform translations. Instead, its translation engine is powered by the open source Argos Translate library.

Demo: https://libretranslate.com/

Screenshots

Screenshot of LibreTranslate

Documentation and resources

CALL FOR TESTERS:
Please try to upgrade LibreTranslate ou to install a new version from the testing branch:

# fresh install:
sudo yunohost app install https://github.com/YunoHost-Apps/libretranslate_ynh/tree/testing

# upgrade an existing install:
sudo yunohost app upgrade libretranslate -u https://github.com/YunoHost-Apps/libretranslate_ynh/tree/testing

Great news! I’ve finally got the time to give some love to this package. This package still uses the latest version of LibreTranslate but changes the way LibreTranslate is built.

News:

  • Build LibreTranslate from source: Previous version of the package installed a more than 5Gb huge version of LibreTranslate. Now, you have two choices:
    • the CPU version: a lighter version, without all the cuda (GPU) dependencies (± 1Gb);
    • the CUDA version: if you have an NVIDA GPU and an AVX-supporterd CPU : a bigger version with GPU support (± 5Gb) but if you use this app only casually, you won’t notice a difference as compared to the CPU version. Note: this upgrade will install the CPU version. You’ll be able to change the version in the new config panel (see below) if you wish (you then have to force upgrade the app for this to take effect).
  • A new environment file: all settings are now in __INSTALL_DIR__/.env so you don’t have to adapt libretranslate.service for each change anymore. All possible variables are written inside so you have more control of your installation.
  • A new config_panel (accessible at yunohost/admin/#/apps/libretranslate/_core/) where you can easily change some settings (such as which language to install) without going to the CLI.

:red_exclamation_mark: Unfortunately, you’ll have to redownload all the models you need (but now you can do this via the webadmin). Only en and fr will be available. :red_exclamation_mark:

API-keys are normally kept after this upgrade if their database is located in __INSTALL_DIR__/db/(usually api_keys.db).

I hope you’ll enjoy it!

Have a nice day.

2 Likes

Tried now on a Proxmox Yunohost virtual machine
Fresh install with settings :

  • subdomain (domain owned and working ok)
  • visitors
  • en,fr
  • cpu

I’ve not set any API key… ? (do I really need 1 ? I’ve not really understood if it’s needed or not… Looks like not)
Going on this subdomain is working nice, tried some french sentences to english is ok.

Thx for this :wink:

EDIT : on the top bar “https://docs/” is the link of “Documentation de l’API”, not good :sad_but_relieved_face:

Thanks a lot for your input!
An api key is not needed but you can create one to use your instance in an Android app for example, or to limit the use of your instance but forcing everyone to have an api key to be able to translate their content on your instance.

I’ve just fixed the link to the api docs :wink:

1 Like

Hey!

Update to 1.8.4~ynh1 gives 502 Bad Gateway, and 1 CPU core 100% full time.

  1. Uninstall (+delete datas stored) then reinstall current version : same problem.
  2. Uninstall (+delete datas stored), then restore previous backup of 1.8.3~ynh1, 502 Bad gateway. Service is not starting.
  3. Same, then restore an old backup 1.7.2~ynh2. It’s ok, running fine.

Good luck !
Thx in advance :slight_smile:

Did you try with 1.9.0 (from today)?

It removes torch dependency which could be the culprit.

If it doesn’t work, could you please share the service’s logs?

Upgrade to 1.9.0 is fine :slight_smile: Thx !