lingarr-translate / lingarr

Lingarr is an application that utilizes LibreTranslate to translate subtitle files to a user-specified target language, providing a locally hosted solution for subtitle localization.
31 stars 0 forks source link

Docker cli usage does not require building libretranslate image #6

Open lucianor opened 6 months ago

lucianor commented 6 months ago

Great work. I managed to run this with docker cli, which made the process much simpler (not a fan of docker-compose)

Create folders for libretranslate and give 777 permission - docker image does not yet support PUID and PGID.

mkdir -p /apps/libretranslate
mkdir -p /apps/libretranslate/local
mkdir -p /apps/libretranslate/db
chmod -R 777 /apps/libretranslate

Run libretranslate docker

docker run -d --name libtranslate -t -p 5000:5000 -v /apps/libretranslate/db:/app/db -v /apps/libretranslate/local:/home/libretranslate/.local libretranslate/libretranslate --disable-web-ui --load-only=pt,en,es

(use other arguments as required: https://github.com/libreTranslate/LibreTranslate/?tab=readme-ov-file#arguments)

Create lingarr folder and use docker cli with arguments required..

mkdir -p /apps/lingarr

docker run -d --name=lingarr  --restart unless-stopped -e LIBRETRANSLATE_API=http://172.17.0.3:5000 -p 9876:9876 -v /media/movies:/app/media/movies -v /media/tvshows:/app/media/tvshows -v /apps/lingarr:/app/config lingarr/lingarr:latest

Note the libretranslate IP address.. I don't usually export libretranslate ports to the outside, and just use the internal bridge IPs.

rowanfuchs commented 5 months ago

Sorry! I should have added an option to do so as this was the initial setup due to how libtranslate has been made. I will leave this comment open for future reference until I have a good alternative.