mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-21 23:41:01 +00:00
fix docker & upgrade base to python:3.10.9-slim-bullseye
This commit is contained in:
parent
1fd329ffd9
commit
62d53e3f09
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue