Files
autorag_dashboard/Dockerfile
2025-03-18 04:34:57 +00:00

32 lines
873 B
Docker

# Base stage: Install common dependencies
FROM python:3.10-slim AS base
# Set working directory and environment variables
WORKDIR /usr/src/app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
# Copy only requirements files first to leverage Docker cache
COPY pyproject.toml ./
# Install system and Python dependencies in a single layer
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
libssl-dev && \
pip install --no-cache-dir --upgrade pip setuptools setuptools-scm && \
rm -rf /var/lib/apt/lists/*
# Copy project files
COPY autorag /usr/src/app/autorag
COPY dashboard.sh /usr/src/app/dashboard.sh
# Install base project
RUN pip install -r requirements.txt
# Set permissions for dashboard script
RUN chmod +x /usr/src/app/dashboard.sh
CMD ["bash", "dashboard.sh"]