File size: 681 Bytes
914b807
 
80e1c62
 
 
914b807
80e1c62
a69de93
 
 
d3fbb15
a69de93
 
80e1c62
 
 
 
914b807
80e1c62
 
914b807
 
80e1c62
914b807
 
80e1c62
 
 
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

# Create persistent storage directory
RUN mkdir -p /data/model /data/repo && \
    chmod -R a+rwx /data

# System 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 code
COPY app.py .

# Hugging Face Spaces configuration
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]