1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00

fix docker & upgrade base to python:3.10.9-slim-bullseye

This commit is contained in:
dingedi 2023-01-12 14:42:09 +01:00
parent 1fd329ffd9
commit 62d53e3f09
No known key found for this signature in database
GPG Key ID: EE23A12D271A3CED

View File

@ -19,10 +19,10 @@ RUN ./venv/bin/pip install Babel==2.11.0 && ./venv/bin/python compile_locales.py
&& ./venv/bin/pip install . \
&& ./venv/bin/pip cache purge
FROM python:3.8.14-slim-bullseye
FROM python:3.10.9-slim-bullseye
ARG with_models=false
ARG models=
ARG models=""
RUN addgroup --system --gid 1032 libretranslate && adduser --system --uid 1032 libretranslate && mkdir -p /home/libretranslate/.local && chown -R libretranslate:libretranslate /home/libretranslate/.local
USER libretranslate
@ -33,9 +33,9 @@ WORKDIR /app
RUN if [ "$with_models" = "true" ]; then \
# initialize the language models
if [ ! -z "$models" ]; then \
./venv/bin/python install_models.py --load_only_lang_codes "$models"; \
./venv/bin/python scripts/install_models.py --load_only_lang_codes "$models"; \
else \
./venv/bin/python install_models.py; \
./venv/bin/python scripts/install_models.py; \
fi \
fi