codedebugger / Dockerfile
psdhanushkumar's picture
Upload folder using huggingface_hub
f361447 verified
Raw
History Blame Contribute Delete
1.35 kB
# ──────────────────────────────────────────────────────────────
# 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"]