File size: 380 Bytes
4c6ca4c
8d06436
4c6ca4c
 
 
 
4f37f46
 
 
4c6ca4c
7ed8f5e
8d06436
12bb355
2183bac
c405dab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.9-slim
RUN useradd -m -u 1000 user
WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# If not already in requirements.txt:
# RUN pip install --no-cache-dir fastapi uvicorn python-multipart pillow requests

COPY --chown=user:user . .
USER user

EXPOSE 7860
CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]