File size: 471 Bytes
cd84d43
 
 
 
 
 
77d097c
 
cd84d43
 
 
 
 
 
 
 
 
77d097c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.12
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv

RUN useradd -m -u 1000 user
ENV PATH="/home/user/.local/bin:$PATH"
ENV UV_SYSTEM_PYTHON=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY --chown=user ./requirements.txt requirements.txt
RUN uv pip install -r requirements.txt

COPY --chown=user . /app
USER user

CMD ["gunicorn", "app:server", "--workers", "2", "--threads", "2", "--timeout", "120", "--bind", "0.0.0.0:7860"]