New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to download models when using docker #332
Comments
Hey @alpap 👋 are you connected directly through the internet or via VPN? It looks like a network configuration error or a firewall issue, not a bug in LibreTranslate per-se. |
I'm having the same issue. In my case its error 110 (URLError(TimeoutError(110, 'Connection timed out')),) I pulled the container and that's all I see when I run it. Edit: Ah, i see my disk is filling up. It's downloading alot. How do I chose which languages I want? |
|
I'm having the same issue with this
|
I also get this in the logs
|
i'm having the same problem without docker |
Probably this issue is related #344 (comment), using an older release tag doesn't fix it, looks like a problem with |
It feels like the whole readme is rather bogus. I was spending all day trying to get this app running and still haven't succeeded (and this isn't the first docker/python application I'm trying to install). @grigio Your case is similar to one I was having. The containerized version seems to have issues in case you've bind-mounted that folder. Probably granting full write permissions might help there. Good to know, that local files aren't stored in /root/.local as stated in the readme but in a separate user's home. Apart from that, I haven't succeeded with creating an API keys database file in container either. No matter what I try, I either run into similar issues with permissions or mounted folders being wrong or any tool failing to access a database file I have to create externally first for the container image has pretty limited tooling though consuming 3.5+ GB which is about 30 times as much disk space as do most web applications based on alpine images. UPDATE: Some additions on what I've tried:
Currently, I have a docker-compose.yml like
on a dedicated server with 6 cores/12 threads and 64 GB RAM so I guess resources aren't the issue anymore. The service is running for 34 minutes now and all I see with docker compose logs is:
|
Looking better now. This my finally working definition, though I doubt any change was fixing issues with fetching the models in particular. I assume those issues are temporary ones and probably some of them are even warnings one can ignore. version: "3.8"
services:
lt:
image: libretranslate/libretranslate
container_name: lt
ports:
- "127.0.0.1:5000:5000"
command: --api-keys --api-keys-db-path=/home/libretranslate/.local/db/api_keys.db
restart: always
volumes:
- lt-db:/home/libretranslate/.local/db
- lt-cache:/home/libretranslate/.local/cache
- lt-share:/home/libretranslate/.local/share
volumes:
lt-db:
lt-cache:
lt-share: Before starting this, you should adjust permissions on those volumes' roots. docker run -it -v root_lt-db:/data alpine chown 1032 /data
docker run -it -v root_lt-share:/data alpine chown 1032 /data
docker run -it -v root_lt-cache:/data alpine chown 1032 /data Full names of volumes (e.g. root_lt-share) may be different in your case, so check with Add API keys like this: docker compose exec lt venv/bin/ltmanage keys --api-keys-db-path /home/libretranslate/.local/db/api_keys.db add 120 UPDATE: FWIW, in my case there is caddy as frontend:
|
#366 addresses the issue of persistent models/API keys. Use |
Found 56 models
Downloading Arabic → English (1.0) ...
(URLError(ConnectionRefusedError(111, 'Connection refused')),)
(URLError(ConnectionRefusedError(111, 'Connection refused')),)
(URLError(ConnectionRefusedError(111, 'Connection refused')),)
The text was updated successfully, but these errors were encountered: