Spaces:
Sleeping
Sleeping
File size: 1,393 Bytes
f28d106 eee32fb f28d106 63d51f5 f28d106 402daee b05986a f28d106 eee32fb f28d106 b05986a 8ed8af9 b05986a 6fd9cf8 b05986a 6fd9cf8 b6d6f2e 6fd9cf8 b05986a 402daee 6fd9cf8 402daee eee32fb 8a75d3b 402daee f28d106 |
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
FROM swaggerapi/swagger-ui:v4.18.2 AS swagger-ui
FROM python:3.10-slim
ARG SERVICE_USER=service
ARG SERVICE_UID=1000
ARG SERVICE_GID=1000
ENV POETRY_VENV=/app/.venv
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qq update \
&& apt-get -qq install --no-install-recommends \
lua5.3 \
lua5.4 \
lua-check \
fswatch \
make \
cargo \
ffmpeg \
redis \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g $SERVICE_GID $SERVICE_USER || true
RUN useradd -u $SERVICE_UID -g $SERVICE_GID -d /app -s /usr/sbin/nologin $SERVICE_USER || true
COPY --chown=$SERVICE_UID:$SERVICE_GID . /app
COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui.css /app/swagger-ui-assets/swagger-ui.css
COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui-bundle.js /app/swagger-ui-assets/swagger-ui-bundle.js
RUN chown $SERVICE_UID:$SERVICE_GID /app
USER $SERVICE_USER
WORKDIR /app
RUN python3 -m venv $POETRY_VENV \
&& $POETRY_VENV/bin/pip install -U pip setuptools \
&& $POETRY_VENV/bin/pip install poetry==1.6.1
ENV PATH="${PATH}:${POETRY_VENV}/bin"
RUN poetry config virtualenvs.in-project true
RUN poetry install && rm -rf /app/.cache/pypoetry
WORKDIR /app/reascripts/ReaSpeech
RUN make publish
WORKDIR /app
RUN rm -rf reascripts
ENTRYPOINT ["python3", "app/run.py"]
EXPOSE 9000
|