File size: 773 Bytes
79459b1
feb33bc
 
 
79459b1
feb33bc
 
583a14b
feb33bc
 
 
3f7c2ad
79459b1
3f7c2ad
79459b1
 
 
 
 
 
 
feb33bc
 
 
583a14b
feb33bc
 
583a14b
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.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \

    build-essential \
    whois \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .

# Upgrade pip and install core deployment components
RUN pip install --no-cache-dir --upgrade pip && \

    pip install --no-cache-dir gunicorn flask flask-cors joblib

# Install scikit-learn 1.8.0 directly to match your local export environment
RUN pip install --no-cache-dir scikit-learn==1.8.0

# Install the rest of your requirements
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENV PORT=7860
EXPOSE 7860

CMD ["gunicorn", "app:app", "--workers", "1", "--timeout", "120", "--bind", "0.0.0.0:7860"]