HarshKalia-24 commited on
Commit
7725547
·
1 Parent(s): 37fe659

fix: added haystack-ai-integrations in requirements

Browse files
Files changed (3) hide show
  1. Dockerfile +10 -6
  2. render.yaml +2 -5
  3. requirements.txt +18 -11
Dockerfile CHANGED
@@ -1,21 +1,25 @@
1
- FROM python:3.11-slim
2
 
3
  # Install system dependencies
4
  RUN apt-get update && \
5
- apt-get install -y tesseract-ocr libtesseract-dev poppler-utils && \
 
 
6
  rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
 
 
10
  RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
11
- # Install Python dependencies first (for layer caching)
 
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Copy application code
16
  COPY . .
17
 
18
- ENV PORT=8000
19
  ENV PYTHONUNBUFFERED=1
20
 
21
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
1
+ FROM python:3.11
2
 
3
  # Install system dependencies
4
  RUN apt-get update && \
5
+ apt-get install -y \
6
+ tesseract-ocr libtesseract-dev poppler-utils \
7
+ build-essential pkg-config libgl1 && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /app
11
 
12
+ # Install PyTorch CPU first
13
  RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
14
+
15
+ # Install project dependencies
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy app code
20
  COPY . .
21
 
 
22
  ENV PYTHONUNBUFFERED=1
23
 
24
+ # Render gives $PORT env, don’t hardcode
25
+ CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"]
render.yaml CHANGED
@@ -2,10 +2,7 @@ services:
2
  - type: web
3
  name: rag-api
4
  runtime: docker
5
- env: python
6
- buildCommand: docker build -t rag-api .
7
- startCommand: uvicorn main:app --host 0.0.0.0 --port 8000
8
  envVars:
9
  - key: GOOGLE_API_KEY
10
- valueFromEnv: GOOGLE_API_KEY
11
- plan: free
 
2
  - type: web
3
  name: rag-api
4
  runtime: docker
5
+ plan: free
 
 
6
  envVars:
7
  - key: GOOGLE_API_KEY
8
+ sync: false
 
requirements.txt CHANGED
@@ -1,15 +1,22 @@
1
- sentence-transformers
2
- pdfplumber
3
- pytesseract
4
- pillow
5
- python-multipart
6
- fastapi
7
- uvicorn
8
- google-generativeai
9
- haystack-ai
10
- haystack-integrations
 
 
 
 
 
 
 
11
  grpcio==1.74.0
12
  grpcio-tools==1.74.0
13
  grpcio-status==1.74.0
14
  protobuf==5.26.1
15
- rpds.py==0.27.0
 
1
+ # Core
2
+ fastapi==0.111.0
3
+ uvicorn==0.30.1
4
+ python-multipart==0.0.9
5
+ pillow==10.3.0
6
+ pdfplumber==0.11.0
7
+ pytesseract==0.3.10
8
+ sentence-transformers==3.0.1
9
+
10
+ # Google Generative AI
11
+ google-generativeai==0.7.2
12
+
13
+ # Haystack v2 core + integrations
14
+ haystack-ai==2.1.0
15
+ haystack-ai-integrations==0.2.1
16
+
17
+ # gRPC (needed by Google / Haystack)
18
  grpcio==1.74.0
19
  grpcio-tools==1.74.0
20
  grpcio-status==1.74.0
21
  protobuf==5.26.1
22
+ rpds-py==0.27.0