File size: 674 Bytes
8630e6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Use official Python image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies (for building Python deps)
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*

# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy project directories
COPY backend ./backend
COPY src ./src
COPY vectorstore ./vectorstore
COPY frontend ./frontend
COPY .env .env


# Expose the port that Hugging Face Spaces expects
EXPOSE 7860

# Run the FastAPI app
CMD ["uvicorn", "backend.api:app", "--host", "0.0.0.0", "--port", "7860"]