audit_assistant / Dockerfile
akryldigital's picture
fix old "Document" import (#3)
9e1adca verified
raw
history blame
1.05 kB
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (for better Docker layer caching)
COPY requirements.txt ./
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Pre-download Hugging Face models during build
# This caches models in the Docker image for faster container startup
COPY download_models.py ./
COPY src/config/settings.yaml ./src/config/settings.yaml
RUN python download_models.py
# Copy all application files (excluding .dockerignore patterns)
COPY . .
# Expose Streamlit port (HF Spaces maps to 7860 automatically)
EXPOSE 8501
# Health check for Streamlit
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Run Streamlit app
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless", "true"]