qa-rag-fastapi / Dockerfile
vansh27's picture
Deploy Fastapi RAG System
a86c572
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (cache-friendly)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy all project files
COPY . .
# Expose FastAPI port
EXPOSE 7860
# Start FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]