File size: 676 Bytes
dc2d570
 
 
 
7118651
dc2d570
 
 
 
7118651
 
dc2d570
7118651
 
 
 
 
 
 
 
 
 
dc2d570
 
 
 
 
 
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
29
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Copy all files first
COPY . .

# Install dependencies directly (not editable mode)
RUN pip install --no-cache-dir \
    fastapi>=0.115.0 \
    uvicorn[standard]>=0.32.0 \
    pydantic>=2.10.0 \
    pydantic-settings>=2.6.0 \
    httpx>=0.28.0 \
    aiohttp>=3.11.0 \
    python-dotenv>=1.0.0 \
    tenacity>=9.0.0

# HuggingFace Spaces uses port 7860
EXPOSE 7860

# Run with uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]