legislation-tracker / Dockerfile
ramanna's picture
Deploy: newsletter display polish
3cc39aa
raw
history blame contribute delete
830 Bytes
# Use Python 3.11 slim image for smaller size
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install additional dependencies for Hugging Face datasets
RUN pip install --no-cache-dir datasets huggingface_hub
# Copy all application files
COPY . .
# Expose port
EXPOSE 8501
# Set environment variables
ENV PYTHONPATH=/app
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Health check
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Run the app + background scheduler
CMD ["bash", "start.sh"]