LibreTranslate_Kabyle / Dockerfile
cool
Update Dockerfile
8552303 verified
Raw
History Blame
817 Bytes
FROM libretranslate/libretranslate
USER root
RUN apt-get update && apt-get install -y curl unzip
# Make .local and session DB directories writable
RUN mkdir -p /.local && chmod -R 777 /.local && \
mkdir -p /app/db/sessions && chmod -R 777 /app/db
# Set HOME to a writable directory
ENV HOME=/app
# Download and install the Kabyle model
RUN curl -L -o /app/en_kab_comp.argosmodel \
https://huggingface.co/spaces/axxam/LibreTranslate_Kabyle/resolve/main/en_kab_comp.argosmodel && \
/app/venv/bin/python3 -c "import argostranslate.package; argostranslate.package.install_from_path('/app/en_kab_comp.argosmodel')"
# Set environment variables
ENV LT_HOST="0.0.0.0"
ENV LT_PORT="7860"
ENV LT_LOAD_ONLY="en,fr,kab_comp"
ENV LT_SSL=True
ENV LT_SUGGESTIONS="true"
ENTRYPOINT ["/app/venv/bin/libretranslate"]