1. add app.py for payloads alike the one in summarizer app; 2. check that the app service works;
56 lines
1.2 KiB
Docker
56 lines
1.2 KiB
Docker
FROM docker.io/library/python:3.12@sha256:6121c801703ec330726ebf542faab113efcfdf2236378c03df8f49d80e7b4180 AS base
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
WORKDIR /app
|
|
|
|
COPY docker/web/apt.requirements.txt docker/web/apt.requirements.txt
|
|
RUN apt-get update \
|
|
&& apt-get install -y $(cat docker/web/apt.requirements.txt)
|
|
|
|
RUN \
|
|
pip3 install \
|
|
--break-system-packages uv
|
|
|
|
RUN apt-get update -yy && apt-get install -yy tini
|
|
|
|
COPY requirements.txt .
|
|
COPY requirements.torch.txt .
|
|
|
|
RUN \
|
|
# --mount=type=bind,source=releases/whl,target=/app/releases/whl \
|
|
--mount=type=cache,target=/root/.cache/pip \
|
|
--mount=type=cache,target=/root/.cache/uv \
|
|
( \
|
|
for requirements in requirements*.txt; do \
|
|
uv pip \
|
|
install \
|
|
--system \
|
|
--break-system-packages \
|
|
-r $requirements; \
|
|
done; \
|
|
)
|
|
|
|
WORKDIR /app
|
|
|
|
FROM base as web
|
|
|
|
RUN \
|
|
--mount=type=bind,source=releases/whl,target=/app/releases/whl \
|
|
--mount=type=cache,target=/root/.cache/pip \
|
|
--mount=type=cache,target=/root/.cache/uv \
|
|
uv pip \
|
|
install \
|
|
--system \
|
|
--break-system-packages \
|
|
--no-index \
|
|
-f releases/whl \
|
|
'online.fxreader.pr34.test_task_2025_07_17_v2==0.1.12'
|
|
|
|
ENTRYPOINT ["tini", "--"]
|
|
CMD [ \
|
|
"python3", \
|
|
"-m", \
|
|
"online.fxreader.pr34.test_task_2025_07_17_v2.async_api.fastapi" \
|
|
]
|