1.7 KiB
title | summary | date | lastmod | categories | tags | draft | |||
---|---|---|---|---|---|---|---|---|---|
73 install libretranslate | Summarized how I finally got LibreTranslate installed on my local mastodon test-instance. <small>I am not affiliated with LibreTranslate -- this post reflects my own use case. The thumbnail is a trademark of [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate/blob/main/TRADEMARK.md).</small> | 2024-12-07T07:22:28+01:00 | 2024-12-08T11:14:36+0000 |
|
|
true |
upgraded VM to 4 cores and 8GB RAM
(also had to increase /tmp folder for pip installation of libretranslate:
tmpfs /tmp tmpfs size=6G,nr_inodes=10k 0 0)
sudo useradd --create-home --home-dir /var/lib/libretranslate libretranslate
paru -S python-libretranslate-git cmake
sudo su - libretranslate
python -m venv venv
source venv/bin/activate
pip3 install --prefer-binary libretranslate
argospm update
for lang in $(argospm search | grep -E "^translate-.._en.*"| awk '{ print $2 }' | xargs); do echo argospm install translate-${lang}_en; done
(remove echo from command to finally execute; the command shows a list of install commands)
now edit mastodon conf to use libretranslate
cd /var/lib/mastodon
add to .env.production
ALLOWED_PRIVATE_ADDRESSES=127.0.0.1 LIBRE_TRANSLATE_ENDPOINT=http://127.0.0.1:5000