File size: 548 Bytes
57d9674
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use lightweight Python base
FROM python:3.10-slim

# Set workdir inside container
WORKDIR /app

# Copy requirements first (for caching layers)
COPY requirements.txt .

# Install system deps + python deps
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    && rm -rf /var/lib/apt/lists/* \
    && pip install --no-cache-dir -r requirements.txt

# Copy rest of the code
COPY . .

# Expose port for HF Spaces
EXPOSE 7860

# Start FastAPI app with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]