Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -7
Dockerfile
CHANGED
@@ -1,19 +1,24 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Install dependencies
|
4 |
-
RUN apt-get update && apt-get install -y wget curl gnupg unzip
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
#
|
7 |
COPY requirements.txt .
|
8 |
RUN pip install --no-cache-dir -r requirements.txt
|
9 |
|
10 |
-
# Install Playwright
|
11 |
-
RUN
|
12 |
|
13 |
-
# Copy
|
14 |
COPY . /app
|
15 |
WORKDIR /app
|
16 |
|
17 |
-
#
|
18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
19 |
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
+
# Install system dependencies required by Playwright
|
4 |
+
RUN apt-get update && apt-get install -y wget curl gnupg unzip \
|
5 |
+
libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 libxss1 \
|
6 |
+
libasound2 libxtst6 libx11-xcb1 libxcomposite1 libxcursor1 \
|
7 |
+
libxdamage1 libxrandr2 libxext6 libxfixes3 libx11-6 libxcb1 \
|
8 |
+
libxinerama1 libpango-1.0-0 libcairo2 libatk-bridge2.0-0 libgtk-3-0
|
9 |
|
10 |
+
# Install Python dependencies
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# Install Playwright and Chromium browser (CRITICAL)
|
15 |
+
RUN playwright install chromium
|
16 |
|
17 |
+
# Copy app code
|
18 |
COPY . /app
|
19 |
WORKDIR /app
|
20 |
|
21 |
+
# Start the FastAPI server
|
22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
23 |
|
24 |
+
|