File size: 817 Bytes
b3b87ca
 
 
 
1f589f1
b3b87ca
8552303
 
 
8a1ddd3
8552303
a158293
 
8552303
 
 
 
ed9a921
8552303
b3b87ca
 
01870c1
8552303
 
8a52c79
8552303
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"]