rag-demo / Dockerfile
github-actions[bot]
Deploy from GitHub Actions - 881aa69300369910bd973fcba04304e70ccfb3f2
7863d4f
raw
history blame contribute delete
636 Bytes
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN pip install uv
# Copy dependency files
COPY pyproject.toml ./
# Install dependencies using uv
RUN uv pip install --system -e .
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p ./app/data/uploads ./chroma_db
# Set environment variables
ENV PYTHONUNBUFFERED=1
# HF Spaces uses port 7860
EXPOSE 7860
# Start the application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]