File size: 587 Bytes
93f7b2a
 
480c756
93f7b2a
480c756
 
f09ac41
 
 
 
 
 
480c756
 
93f7b2a
480c756
 
 
 
f09ac41
e6451d1
480c756
93f7b2a
e6451d1
480c756
93f7b2a
ef98ebe
 
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
# Use lightweight Python base
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your Flask app
COPY . .

# Expose port (use Hugging Face default 7860)
EXPOSE 7860

# Set environment variable for Flask
ENV PORT=7860

# Run Flask app
CMD ["python", "app2.py"]
# CMD ["waitress-serve", "--port=7860", "app2:app"]