File size: 636 Bytes
914b807
 
fb6c9af
914b807
fb6c9af
a69de93
 
 
d3fbb15
a69de93
 
80e1c62
fb6c9af
 
 
914b807
80e1c62
 
914b807
 
fb6c9af
914b807
 
fb6c9af
80e1c62
fb6c9af
 
 
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
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"]