NightFury2710 commited on
Commit
01421d9
·
1 Parent(s): 60904ca

update api handle 3

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -13,6 +13,9 @@ RUN apt-get update && apt-get install -y \
13
  && apt-get install -y google-chrome-stable \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
 
 
16
  # Copy requirements and install Python packages
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
@@ -25,5 +28,9 @@ RUN playwright install-deps
25
  # Copy application code
26
  COPY app.py .
27
 
 
 
 
 
28
  # Run the application
29
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
13
  && apt-get install -y google-chrome-stable \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Create crawl4ai directory with proper permissions
17
+ RUN mkdir -p /.crawl4ai && chmod 777 /.crawl4ai
18
+
19
  # Copy requirements and install Python packages
20
  COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
 
28
  # Copy application code
29
  COPY app.py .
30
 
31
+ # Run the application with non-root user
32
+ RUN useradd -m myuser
33
+ USER myuser
34
+
35
  # Run the application
36
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]