Minor fixes

This commit is contained in:
Eugene Davis 2022-09-13 23:09:20 +02:00
parent 81f667b214
commit 9d6d06ceeb
No known key found for this signature in database
GPG key ID: 4F8D810C1E74BE07

View file

@ -1,8 +1,5 @@
FROM python:3.8.12-slim-bullseye as builder FROM python:3.8.12-slim-bullseye as builder
ARG with_models=false
ARG models=
WORKDIR /app WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -24,11 +21,14 @@ RUN ./venv/bin/pip install . \
FROM python:3.8.12-slim-bullseye FROM python:3.8.12-slim-bullseye
ARG with_models=false
ARG models=
RUN addgroup --system --gid 1032 libretranslate && adduser --system --uid 1032 libretranslate RUN addgroup --system --gid 1032 libretranslate && adduser --system --uid 1032 libretranslate
RUN apt-get update -qq && apt-get -qqq install --no-install-recommends -y libicu67 && apt-get clean && rm -rf /var/lib/apt RUN apt-get update -qq && apt-get -qqq install --no-install-recommends -y libicu67 && apt-get clean && rm -rf /var/lib/apt
USER libretranslate USER libretranslate
COPY --from=builder --chown=libretranslate:libretranslate /app /app COPY --from=builder --chown=1032:1032 /app /app
WORKDIR /app WORKDIR /app
RUN if [ "$with_models" = "true" ]; then \ RUN if [ "$with_models" = "true" ]; then \