Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[support] kilrah/libretranslate

Featured Replies

[Template only, I am not the container author/maintainer]

 

Template: https://github.com/kilrah/unraid-docker-templates/raw/main/templates/libretranslate.xml 

Project: https://github.com/LibreTranslate/LibreTranslate

Registry: https://hub.docker.com/r/libretranslate/libretranslate

 

Free and Open Source Machine Translation API, entirely self-hosted.

You will need to create a "cache" and a "share" folder manually in the specified appdata folder manually before the container will run.

First start takes a while as models are being downloaded.

 

Edited by Kilrah

Anything special that needs to be done on the setup? I am getting an error when trying to query libretranslate:

 

POST / HTTP/1.1

Content-Type: application/json

User-Agent: PostmanRuntime/7.29.2

Accept: */*

Host: 192.168.0.99:5000

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Content-Length: 59

 

{

"q": "Hello!",

"source": "en",

"target": "es"

}

 

HTTP/1.1 405 METHOD NOT ALLOWED

Access-Control-Allow-Credentials: true

Access-Control-Allow-Headers: Authorization, Content-Type

Access-Control-Allow-Methods: GET, POST

Access-Control-Allow-Origin: *

Access-Control-Expose-Headers: Authorization

Access-Control-Max-Age: 1728000

Allow: HEAD, GET, OPTIONS

Content-Length: 153

Content-Type: text/html; charset=utf-8

Date: Thu, 24 Nov 2022 20:40:21 GMT

Server: waitress

 

<!doctype html>

<html lang=en>

<title>405 Method Not Allowed</title>

<h1>Method Not Allowed</h1>

<p>The method is not allowed for the requested URL.</p>

  • Author

I've only tried the WebUI and nothing else...

  • 1 month later...

i think an updated image has been made available. @Kilrah would you mind updating this? thank you.

  • Author

I only made the template, if the image is updated unraid will show you it's available and update.

  • 2 years later...

@Kilrah thanks for this template.

Because this container uses so much space, my docker vdisk is almost full at 93%.

Is it recommended to increase the vdisk size and how would this be done the easyest way without loosing any container?

edit:

found the right way. it's needed to stop docker service to see the setting to change vdisk size.

Edited by NoRaid99

  • 2 months later...

Libretranslate Docker container does not work anymore since update to v1.8.3.

Before there where problems when choosing languages and now it completely stucks at boot:

░█░░░▀█▀░█▀▄░█▀▄░█▀▀░▀█▀░█▀▄░█▀█░█▀█░█▀▀░█░░░█▀█░▀█▀░█▀▀
░█░░░░█░░█▀▄░█▀▄░█▀▀░░█░░█▀▄░█▀█░█░█░▀▀█░█░░░█▀█░░█░░█▀▀
░▀▀▀░▀▀▀░▀▀░░▀░▀░▀▀▀░░▀░░▀░▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀░▀░░▀░░▀▀▀
v1.8.3
Booting...

any hints what I could do?

how can I run a older/specific release?

additionally I have to say that it was working before with v1.8.3. but the last days there was a update information in unraid and after updating it got broken.

the strange thing is, that v1.8.3 is allready the latest release.

edit:

after deleting the container with removing the img, restart unraid server and reinstall libretranslate, it is working again.

this seems a bit strange. hope it does not show-up a update again, as long there is none, and breaks the container again.

Edited by NoRaid99

  • Author

Still works the same from what I can see, it's on that "Booting" message as long as it isn't done downloading the 10GB of models.

Said models used to be part of the image IIRC but they're now mappable to a folder so I updated the template to reflect that, they'll now be stored in appdata so won't bloat the Docker image anymore nor have to be downloaded again on each update.

Uninstall and reinstall from CA to get the new template with the appdata folder. First start will still take a while as those 10GB get downloaded.

Edited by Kilrah

@Kilrah thanks a lot for this modification. must be much better now.

will these language models stored in appdata be updatet in future automatically by the libretranslate application?

  • Author

No idea, I'd expect it does validate and update them if needed since mapping the folder is now part of the official instructions.

Was always disappointed by the output so never really used it myself.

Edited by Kilrah

1 hour ago, Kilrah said:

Was always disappointed by the output so never really used it myself.

It is slowly getting better, depends on the languages too.

For a enduser- free, self hosted docker container that does respect privacy, I think this is what we can get at the moment. I'm fine with it and pleased, that this exists.

don't compare with the real big - ***** - only commercial solutions, respecting nothing and nobody.

  • Author

Yeah I'm comparing with a locally run LLM, also all local but night and day difference

LLM is a huge difference, I agree.

what and how are you running it?


Another thing, yesterday I did create the libretranslate docker new and today unraid offers me a update.

but there is no new releases. exactly this happend before and did break the container.

do you have a glue whats about that updating error?

notification mail:

Event: Docker - libretranslate [b3da..e57a]
Subject: Notice [QNAP] - Version update b3da..e57a
Description: A new version of libretranslate is available
Importance: normal

edit:

did let the update run and the container is still okay.

I wonder if the update info shows up tomorrow again.

Edited by NoRaid99

  • Author
2 hours ago, NoRaid99 said:

Another thing, yesterday I did create the libretranslate docker new and today unraid offers me a update.

but there is no new releases.

They did rebuild the container 18 hours ago indeed.

https://hub.docker.com/r/libretranslate/libretranslate/tags

Every time they build the container you'll get it updated, regardless of whether the application itself is a new version. Containers are a whole system environment, it needs its own maintenance too. Some projects rebuild containers daily regardless of any change.

Edited by Kilrah

  • 2 weeks later...

since last update libretranslate is not starting any more.

PermissionError: [Errno 13] Permission denied: '/home/libretranslate/.config'

allready tried to delete and reinstall, run as privileged. doesn't help.

@ Kilrah do you have any idea what has changed now? seems to be a bit chaotic.

I did try to install the older v1.8.3 today, and it ends up with the same permission error.

didn't update anything on the unraid system, only updated docker containers.

anybody a idea how to find the cause what did break and how to repair?

PermissionError: [Errno 13] Permission denied: '/home/libretranslate/.config'

mkdir: cannot create directory ‘/app/db/prometheus’: Permission denied

usage: gunicorn [OPTIONS] [APP_MODULE]

gunicorn: error: argument -w/--workers: expected one argument

edit:

I wonder if the unraid tool "Docker Safe New Perms" could solve this, but I'm scared to break more than what is now.

Edited by NoRaid99

  • Author

Looks like they changed some things and it's a pain now, try removing the "-u 99:100" in Extra parameters in Advanced view.

Hi, thanks a lot for helping.

removing the "-u 99:100" I was trying allready, and as well privileged mode, but it did make no difference.

my handycap is that I don't know enought about docker.

Somehow it is not very transparent for me to find the changes they make. I will try from time to time and maybe it will work again one day.

@Kilrah it's working again, thanks for fixing the template.

I got the PermissionError: [Errno 13] Permission denied: '/home/libretranslate/.local/share' error after upgrading too.

"chown -R 1032:1032 /mnt/user/appdata/libretranslate" solved it for me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.