Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
WORKDIR /app | |
# Install essential dependencies | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
git \ | |
curl \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Node.js and nport | |
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
&& apt-get install -y nodejs \ | |
&& npm install -g nport | |
# Python dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Application files | |
COPY app.py . | |
# Hugging Face Spaces requires port 7860 | |
EXPOSE 7860 | |
# Use gunicorn with timeout | |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"] |