fmab777 commited on
Commit
2f0ec37
·
verified ·
1 Parent(s): 3e7da99

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -4,9 +4,10 @@ FROM python:3.10-slim
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
@@ -44,7 +45,7 @@ COPY requirements.txt .
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
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # *** CHANGED HOME DIRECTORY ***
8
+ # Set the HOME environment variable to /tmp which should be writable.
9
+ # This should influence where crawl4ai attempts to create its .crawl4ai directory.
10
+ ENV HOME=/tmp
11
 
12
  # Install system dependencies required by Playwright/crawl4ai
13
  # Based on Playwright's recommendations for Debian/Ubuntu
 
45
  RUN pip install --no-cache-dir -r requirements.txt
46
 
47
  # Run crawl4ai post-installation setup (installs browser binaries)
48
+ # This should now download browsers relative to HOME=/tmp or its internal logic.
49
  RUN crawl4ai-setup
50
 
51
  # Copy the rest of the application code into the container at /app