Update Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
CHANGED
|
@@ -4,13 +4,34 @@ FROM python:3.10.9
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the requirements file into the container
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
# Install Python dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
|
|
|
|
| 13 |
RUN playwright install
|
|
|
|
| 14 |
# Create the .crawl4ai directory with correct permissions
|
| 15 |
RUN mkdir /.crawl4ai && chmod 777 /.crawl4ai
|
| 16 |
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
libnss3 \
|
| 10 |
+
libnspr4 \
|
| 11 |
+
libdbus-1-3 \
|
| 12 |
+
libatk1.0-0 \
|
| 13 |
+
libatk-bridge2.0-0 \
|
| 14 |
+
libcups2 \
|
| 15 |
+
libdrm2 \
|
| 16 |
+
libxkbcommon0 \
|
| 17 |
+
libatspi2.0-0 \
|
| 18 |
+
libxcomposite1 \
|
| 19 |
+
libxdamage1 \
|
| 20 |
+
libxfixes3 \
|
| 21 |
+
libxrandr2 \
|
| 22 |
+
libgbm1 \
|
| 23 |
+
libasound2 \
|
| 24 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 25 |
+
|
| 26 |
# Copy the requirements file into the container
|
| 27 |
COPY requirements.txt .
|
| 28 |
|
| 29 |
# Install Python dependencies
|
| 30 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 31 |
|
| 32 |
+
# Install Playwright browsers
|
| 33 |
RUN playwright install
|
| 34 |
+
|
| 35 |
# Create the .crawl4ai directory with correct permissions
|
| 36 |
RUN mkdir /.crawl4ai && chmod 777 /.crawl4ai
|
| 37 |
|