File size: 684 Bytes
2b85ffb
 
 
 
 
 
 
dc0c2d6
2b85ffb
 
dc0c2d6
2b85ffb
 
 
 
 
 
 
 
 
 
 
dc0c2d6
2b85ffb
 
 
 
dc0c2d6
2b85ffb
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
30
# Use official slim Python image
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /app

# Install system deps required by opencv & dependencies on Debian 12 (trixie)
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and install
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install -r /app/requirements.txt

# Copy app code
COPY . /app

# Ensure logs directory exists
RUN mkdir -p /app/logs

EXPOSE 5000

# Run with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--threads", "4", "app:app"]