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:
parent
1fd329ffd9
commit
62d53e3f09
@ -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 install . \
|
||||||
&& ./venv/bin/pip cache purge
|
&& ./venv/bin/pip cache purge
|
||||||
|
|
||||||
FROM python:3.8.14-slim-bullseye
|
FROM python:3.10.9-slim-bullseye
|
||||||
|
|
||||||
ARG with_models=false
|
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
|
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
|
USER libretranslate
|
||||||
@ -33,9 +33,9 @@ WORKDIR /app
|
|||||||
RUN if [ "$with_models" = "true" ]; then \
|
RUN if [ "$with_models" = "true" ]; then \
|
||||||
# initialize the language models
|
# initialize the language models
|
||||||
if [ ! -z "$models" ]; then \
|
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 \
|
else \
|
||||||
./venv/bin/python install_models.py; \
|
./venv/bin/python scripts/install_models.py; \
|
||||||
fi \
|
fi \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user