---
# nocheck: playwright-service-flag β translation engine without a browser surface of its own
libretranslate-engine:
name: libretranslate-engine
healthcheck:
test: ["CMD-SHELL", "./venv/bin/python scripts/healthcheck.py"]
# nocheck: healthcheck-timing-override the probe starts a venv interpreter, which does not finish inside the 5s default
timeout: 10s
modes:
compose:
enabled: true
swarm:
enabled: true
bond: 1
enabled: true
shared: true
image: libretranslate/libretranslate
version: v1.9.6
version_variants:
- "-cuda"
custom: true
min_storage: 402MB
load_only: []
serves:
- ar
- az
- bg
- bn
- ca
- cs
- da
- de
- el
- eo
- es
- et
- eu
- fa
- fi
- fr
- ga
- gl
- he
- hi
- hu
- id
- it
- ja
- ko
- ky
- lt
- lv
- ms
- nb
- nl
- pl
- pt
- ro
- ru
- sk
- sl
- sq
- sv
- sw
- th
- tl
- tr
- uk
- ur
- vi
- zh
loading_model: lazy
models_dir: "{{ [DIR_CACHE, 'models', 'libretranslate'] | path_join }}"
directions: both
prefetch_timeout_seconds: 1800
prefetch_retries: 6
ports:
local:
http: 8097
internal:
http: 5000
lifecycle: beta
cpus: "1.0"
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
gpu: true
docs:
bond: 0.5
enabled: "{{ 'web-app-docs' in group_names }}"
shared: "{{ 'web-app-docs' in group_names }}"