TroglodyteDerivations's picture
Upload 18 files
3ed75f5 verified
raw
history blame contribute delete
618 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:7860/_dash-health-check || exit 1
# Run the application
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:server"]