File size: 640 Bytes
370d5e9
 
 
 
 
 
 
 
 
3f3ce8d
 
 
5263a14
de9c12c
3f3ce8d
370d5e9
1429b69
 
370d5e9
1429b69
 
370d5e9
1429b69
 
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
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install uv for faster package installation
RUN pip install uv

# Copy requirements and install dependencies with uv
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt

# Copy the entire application from the current directory
COPY . .

# Create a writable directory for ChromaDB (required for HF Spaces)
RUN mkdir -p /app/chroma_db && chmod 777 /app/chroma_db

# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]