Spaces:
Sleeping
Sleeping
File size: 675 Bytes
860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 860eb1d 497e857 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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"]
|