1qwsd commited on
Commit
8ad9394
·
verified ·
1 Parent(s): 3b8e47c

Create docker

Browse files
Files changed (1) hide show
  1. docker +53 -0
docker ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies for Playwright
7
+ RUN apt-get update && apt-get install -y \
8
+ wget \
9
+ gnupg \
10
+ ca-certificates \
11
+ fonts-liberation \
12
+ libasound2 \
13
+ libatk-bridge2.0-0 \
14
+ libatk1.0-0 \
15
+ libcups2 \
16
+ libdbus-1-3 \
17
+ libdrm2 \
18
+ libgbm1 \
19
+ libgtk-3-0 \
20
+ libnss3 \
21
+ libxcomposite1 \
22
+ libxdamage1 \
23
+ libxrandr2 \
24
+ xdg-utils \
25
+ && rm -rf /var/lib/apt/lists/*
26
+
27
+ # Copy requirements
28
+ COPY requirements.txt .
29
+
30
+ # Install Python dependencies
31
+ RUN pip install --no-cache-dir -r requirements.txt
32
+
33
+ # Install Playwright browsers
34
+ RUN playwright install chromium
35
+ RUN playwright install-deps chromium
36
+
37
+ # Copy application code
38
+ COPY . .
39
+
40
+ # Create necessary directories
41
+ RUN mkdir -p models logs
42
+
43
+ # Expose Gradio port
44
+ EXPOSE 7860
45
+
46
+ # Environment variables
47
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
48
+ ENV GRADIO_SERVER_PORT=7860
49
+ ENV PYTHONUNBUFFERED=1
50
+ ENV HEADLESS=true
51
+
52
+ # Run application
53
+ CMD ["python", "app.py"]