James Frecheville
commited on
Commit
·
e0a76c8
1
Parent(s):
e7f6bbd
Update Gradio version and add Dockerfile with Playwright dependencies
Browse files- Dockerfile +40 -0
- requirements.txt +1 -1
Dockerfile
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
# Install system dependencies for Playwright
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
libnss3 \
|
6 |
+
libnspr4 \
|
7 |
+
libatk1.0-0 \
|
8 |
+
libatk-bridge2.0-0 \
|
9 |
+
libcups2 \
|
10 |
+
libxcomposite1 \
|
11 |
+
libxdamage1 \
|
12 |
+
libatspi2.0-0 \
|
13 |
+
libxrandr2 \
|
14 |
+
libgbm1 \
|
15 |
+
libasound2 \
|
16 |
+
libpango-1.0-0 \
|
17 |
+
libpangocairo-1.0-0 \
|
18 |
+
libgdk-pixbuf2.0-0 \
|
19 |
+
libgtk-3-0 \
|
20 |
+
&& rm -rf /var/lib/apt/lists/*
|
21 |
+
|
22 |
+
# Set working directory
|
23 |
+
WORKDIR /app
|
24 |
+
|
25 |
+
# Copy requirements and install Python dependencies
|
26 |
+
COPY requirements.txt .
|
27 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
28 |
+
|
29 |
+
# Install Playwright browsers
|
30 |
+
RUN playwright install chromium
|
31 |
+
RUN playwright install-deps
|
32 |
+
|
33 |
+
# Copy the rest of the application
|
34 |
+
COPY . .
|
35 |
+
|
36 |
+
# Expose the port
|
37 |
+
EXPOSE 7861
|
38 |
+
|
39 |
+
# Run the application
|
40 |
+
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio
|
2 |
docx2markdown>=0.1.1
|
3 |
chunkr-ai>=0.0.41
|
4 |
camel-ai[all]==0.2.36
|
|
|
1 |
+
gradio>=4.19.2
|
2 |
docx2markdown>=0.1.1
|
3 |
chunkr-ai>=0.0.41
|
4 |
camel-ai[all]==0.2.36
|