Files
computer-playbook/roles/web-svc-libretranslate/files/Dockerfile
kevinveenbirkenbachandClaude Fable 5 0719b69131 fix(web-svc-libretranslate): bake pinned models into a versioned image
Without persisted models a rescheduled swarm task re-downloads the argos
packages on a fresh node, which exceeds the reschedule reachability
probe window and fails the chaos test. Build a custom image that bakes
the configured language pairs (services.libretranslate.load_only, joined
into LT_LOAD_ONLY and the install_models build arg from a single SPOT)
so every node starts warm. Proven live: the baked image serves HTTP 200
within ~20s with no runtime download. Pin the base to v1.9.6 instead of
latest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 21:41:43 +02:00

7 lines
238 B
Docker

ARG LIBRETRANSLATE_IMAGE
ARG LIBRETRANSLATE_VERSION
FROM ${LIBRETRANSLATE_IMAGE}:${LIBRETRANSLATE_VERSION}
ARG LIBRETRANSLATE_LOAD_ONLY
RUN ./venv/bin/python scripts/install_models.py --load_only_lang_codes "${LIBRETRANSLATE_LOAD_ONLY}"