HackerBol commited on
Commit
ec3df0d
·
verified ·
1 Parent(s): 136d70b

Add custom Dockerfile with Playwright browser deps

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.13
2
+
3
+ # Install system dependencies for Playwright
4
+ RUN apt-get update && apt-get install -y \
5
+ git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 \
6
+ libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
7
+ libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
8
+ libgbm1 libpango-1.0-0 libcairo2 libasound2 \
9
+ && rm -rf /var/lib/apt/lists/* \
10
+ && git lfs install
11
+
12
+ WORKDIR /app
13
+
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir pip -U && \
16
+ pip install --no-cache-dir \
17
+ datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1"
18
+
19
+ RUN pip install --no-cache-dir -r requirements.txt \
20
+ gradio[oauth]==4.44.1 "uvicorn>=0.14.0" "websockets>=10.4" spaces
21
+
22
+ # Install Playwright browsers
23
+ RUN playwright install chromium
24
+ RUN playwright install-deps chromium || true
25
+
26
+ COPY . .
27
+
28
+ EXPOSE 7860
29
+ ENV GRADIO_SERVER_NAME=0.0.0.0
30
+ ENV GRADIO_SERVER_PORT=7860
31
+
32
+ CMD ["python", "app.py"]