Spaces:
Sleeping
Sleeping
Commit
·
7725547
1
Parent(s):
37fe659
fix: added haystack-ai-integrations in requirements
Browse files- Dockerfile +10 -6
- render.yaml +2 -5
- requirements.txt +18 -11
Dockerfile
CHANGED
|
@@ -1,21 +1,25 @@
|
|
| 1 |
-
FROM python:3.11
|
| 2 |
|
| 3 |
# Install system dependencies
|
| 4 |
RUN apt-get update && \
|
| 5 |
-
apt-get install -y
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
-
ENV PORT=8000
|
| 19 |
ENV PYTHONUNBUFFERED=1
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
| 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 |
-
|
| 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 |
-
|
| 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 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
grpcio==1.74.0
|
| 12 |
grpcio-tools==1.74.0
|
| 13 |
grpcio-status==1.74.0
|
| 14 |
protobuf==5.26.1
|
| 15 |
-
rpds
|
|
|
|
| 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
|