Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
@@ -4,6 +4,10 @@ FROM python:3.10-slim
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
|
|
|
|
|
|
|
|
7 |
# Install system dependencies required by Playwright/crawl4ai
|
8 |
# Based on Playwright's recommendations for Debian/Ubuntu
|
9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
@@ -40,6 +44,7 @@ COPY requirements.txt .
|
|
40 |
RUN pip install --no-cache-dir -r requirements.txt
|
41 |
|
42 |
# Run crawl4ai post-installation setup (installs browser binaries)
|
|
|
43 |
RUN crawl4ai-setup
|
44 |
|
45 |
# Copy the rest of the application code into the container at /app
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Set the HOME environment variable to the working directory
|
8 |
+
# This prevents libraries like crawl4ai trying to write to "/"
|
9 |
+
ENV HOME=/app
|
10 |
+
|
11 |
# Install system dependencies required by Playwright/crawl4ai
|
12 |
# Based on Playwright's recommendations for Debian/Ubuntu
|
13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
44 |
RUN pip install --no-cache-dir -r requirements.txt
|
45 |
|
46 |
# Run crawl4ai post-installation setup (installs browser binaries)
|
47 |
+
# It should now respect the HOME=/app setting for its cache/data paths
|
48 |
RUN crawl4ai-setup
|
49 |
|
50 |
# Copy the rest of the application code into the container at /app
|