Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # System deps: gcc for astroscrappy C extension, git for version info | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc g++ git libffi-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy dependency files first (layer caching) | |
| COPY requirements.txt . | |
| # Install all Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY asteroidnet/ asteroidnet/ | |
| COPY app.py . | |
| # Hugging Face Spaces requires port 7860 | |
| EXPOSE 7860 | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| ENV GRADIO_SERVER_PORT=7860 | |
| # Prevent matplotlib from trying to open display | |
| ENV MPLBACKEND=Agg | |
| CMD ["python", "app.py"] | |