File size: 746 Bytes
a8bc862
 
 
 
 
 
 
 
 
 
 
 
27db421
 
b52ec4a
27db421
a8bc862
 
 
 
 
 
3d40664
 
a8bc862
 
 
 
 
4ac9ecb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#Dockerfile

FROM python:3.13-slim

ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN mkdir -p /ms-playwright
RUN python -m playwright install --with-deps chromium
RUN chmod -R a+rX /ms-playwright

RUN useradd -m -u 1000 user
USER user

COPY --chown=user . /app

EXPOSE 7860

ENV PYTHONUNBUFFERED=1

RUN chmod -R a+rX /ms-playwright || true

# RUN uvicorn app_gui:app --host 0.0.0.0 --port $PORT 
CMD ["uvicorn", "app_gui:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers" , "--forwarded-allow-ips=*"]