File size: 485 Bytes
7c77477
 
b77f44c
7c77477
1a17921
b77f44c
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# UPDATE: Changed from v1.40.0 to v1.57.0 to match the latest library version
FROM mcr.microsoft.com/playwright/python:v1.57.0-jammy

# Create a new user (UID 1001) to avoid conflict with existing 'pwuser'
RUN useradd -m -u 1001 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

COPY --chown=user . $HOME/app

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

EXPOSE 7860

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]