File size: 615 Bytes
4e3c10b
e0d70f0
 
 
 
 
4e3c10b
e0d70f0
 
4e3c10b
 
 
 
 
 
 
e0d70f0
4e3c10b
83a79d5
4e3c10b
 
e0d70f0
 
4e3c10b
 
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
# Use lightweight official Python image
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Copy all files to container
COPY . /app

# Install system dependencies (important for OpenCV, Torch, etc.)
RUN apt-get update && apt-get install -y \
    gcc \
    ffmpeg \
    libsm6 \
    libxext6 \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install --upgrade pip && pip install --no-cache-dir cloudinary && pip install --no-cache-dir -r requirements.txt

# Expose port for FastAPI
EXPOSE 7860

# Run FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]