FROM python:3.9-alpine WORKDIR /app COPY ./requirements.txt /app/requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH COPY --chown=user . /app CMD ["gunicorn", "-b", "0.0.0.0:7860", "web_interface:app"]