Spaces:
Sleeping
Sleeping
Commit
·
7ab13a2
1
Parent(s):
a62f47b
added docker file
Browse files- backend/Dockerfile +28 -0
- backend/requirements.txt +3 -12
backend/Dockerfile
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use official Python image with a more recent version
|
2 |
+
FROM python:3.11-slim
|
3 |
+
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
gcc \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Copy requirements from backend and install
|
13 |
+
COPY backend/requirements.txt .
|
14 |
+
|
15 |
+
# Upgrade pip to latest version to resolve dependency conflicts better
|
16 |
+
RUN pip install --upgrade pip
|
17 |
+
|
18 |
+
# Install Python dependencies
|
19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
20 |
+
|
21 |
+
# Copy the backend code
|
22 |
+
COPY backend/ .
|
23 |
+
|
24 |
+
# Expose the port your FastAPI app runs on
|
25 |
+
EXPOSE 7860
|
26 |
+
|
27 |
+
# Command to run the FastAPI app
|
28 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
backend/requirements.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
fastapi==0.104.1
|
3 |
uvicorn[standard]==0.24.0
|
4 |
|
5 |
-
# HTTP client for MCP calls
|
6 |
-
httpx
|
7 |
|
8 |
# Qdrant vector database
|
9 |
qdrant-client==1.8.0
|
@@ -20,7 +20,7 @@ python-dotenv==1.0.0
|
|
20 |
# Structured logging
|
21 |
structlog==23.2.0
|
22 |
|
23 |
-
# Data processing and embeddings
|
24 |
sentence-transformers==2.2.2
|
25 |
datasets==2.18.0
|
26 |
pandas==2.1.4
|
@@ -28,17 +28,8 @@ pandas==2.1.4
|
|
28 |
# MCP client (for web search integration)
|
29 |
fastmcp==0.3.0
|
30 |
|
31 |
-
# Logging and monitoring
|
32 |
-
structlog==23.2.0
|
33 |
-
|
34 |
# Data validation
|
35 |
pydantic==2.5.0
|
36 |
|
37 |
-
# Async support
|
38 |
-
asyncio==3.4.3
|
39 |
-
|
40 |
-
# UUID generation (built-in, but listed for clarity)
|
41 |
-
# uuid (built-in)
|
42 |
-
|
43 |
# JSON handling
|
44 |
orjson==3.9.10
|
|
|
2 |
fastapi==0.104.1
|
3 |
uvicorn[standard]==0.24.0
|
4 |
|
5 |
+
# HTTP client for MCP calls (updated to resolve conflict with fastmcp)
|
6 |
+
httpx>=0.26.0
|
7 |
|
8 |
# Qdrant vector database
|
9 |
qdrant-client==1.8.0
|
|
|
20 |
# Structured logging
|
21 |
structlog==23.2.0
|
22 |
|
23 |
+
# Data processing and embeddings
|
24 |
sentence-transformers==2.2.2
|
25 |
datasets==2.18.0
|
26 |
pandas==2.1.4
|
|
|
28 |
# MCP client (for web search integration)
|
29 |
fastmcp==0.3.0
|
30 |
|
|
|
|
|
|
|
31 |
# Data validation
|
32 |
pydantic==2.5.0
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
# JSON handling
|
35 |
orjson==3.9.10
|