FROM python:3.11 RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH="/home/user/.local/bin:$PATH" RUN mkdir -p /home/user/app WORKDIR /home/user/app COPY --chown=user ./requirements.txt requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt COPY --chown=user . /home/user/app EXPOSE 7860 ENTRYPOINT ["python", "server.py"]