dina1 commited on
Commit
5054b40
·
verified ·
1 Parent(s): bf81d86

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -14
Dockerfile CHANGED
@@ -1,12 +1,8 @@
1
- # ===============================
2
- # 🐳 Dockerfile for Hugging Face Spaces - FastAPI + Playwright
3
- # ===============================
4
-
5
- FROM python:3.10-slim
6
 
7
  WORKDIR /app
8
 
9
- # Upgrade pip first (avoids package resolution issues)
10
  RUN pip install --upgrade pip
11
 
12
  # Install system dependencies for Playwright + fonts
@@ -18,21 +14,16 @@ RUN apt-get update && apt-get install -y \
18
  fonts-liberation libappindicator3-1 libnspr4 libx11-xcb1 libxrender1 \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
- # Copy dependencies and install them
22
  COPY requirements.txt .
23
- # Pin LangChain to 1.0.5 (latest available on your build environment)
24
- RUN sed -i 's/langchain>=1.2.0/langchain==1.0.5/' requirements.txt
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
- # Install Playwright and Chromium
28
  RUN pip install --no-cache-dir playwright
29
  RUN playwright install --with-deps chromium
30
 
31
- # Copy the rest of your app
32
  COPY . .
33
 
34
- # Hugging Face Spaces expects apps on port 7860
35
  EXPOSE 7860
36
-
37
- # Run FastAPI app
38
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.11-slim
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # Upgrade pip
6
  RUN pip install --upgrade pip
7
 
8
  # Install system dependencies for Playwright + fonts
 
14
  fonts-liberation libappindicator3-1 libnspr4 libx11-xcb1 libxrender1 \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Copy dependencies and install
18
  COPY requirements.txt .
 
 
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Playwright + Chromium
22
  RUN pip install --no-cache-dir playwright
23
  RUN playwright install --with-deps chromium
24
 
25
+ # Copy app
26
  COPY . .
27
 
 
28
  EXPOSE 7860
 
 
29
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]