File size: 740 Bytes
9ee8b1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
# Use Python 3.10 as base image
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system dependencies and uv
RUN apt-get update && apt-get install -y \
    poppler-utils \
    curl \
    && rm -rf /var/lib/apt/lists/* \
    && curl -LsSf https://astral.sh/uv/install.sh | sh

# Copy requirements first to leverage Docker cache
COPY requirements.txt .

# Install Python dependencies using uv
RUN uv pip install -r pyproject.toml

# Copy the rest of the application
COPY . .

# Create directories for uploads and embeddings if they don't exist
RUN mkdir -p uploads embeddings

# Expose the port the app runs on
EXPOSE 7860

# Change to rag_demo directory and run the app
WORKDIR /app/rag_demo
CMD ["uv", "run", "app.py"]