# ────────────────────────────────────────────────────────────── # CodeDebugger — Dockerfile for Hugging Face Spaces # ────────────────────────────────────────────────────────────── FROM python:3.11-slim # System deps (curl needed for healthcheck) RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ curl \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements first for layer caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy project COPY . . # Create outputs dir with pre-generated data RUN mkdir -p outputs # Expose Streamlit port (HF Spaces default) EXPOSE 7860 # Health check HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ CMD curl -f http://localhost:7860/_stcore/health || exit 1 # Run Streamlit — app.py is at /app/app.py (not codedebugger/app.py) ENV PYTHONPATH=/app CMD ["streamlit", "run", "app.py", \ "--server.port=7860", \ "--server.address=0.0.0.0", \ "--server.headless=true", \ "--browser.gatherUsageStats=false"]