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