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