File size: 682 Bytes
f8982fc
 
373d68a
5eeec9a
 
373d68a
 
 
 
 
 
 
 
5eeec9a
373d68a
f8982fc
373d68a
f8982fc
5eeec9a
373d68a
f8982fc
 
373d68a
5eeec9a
 
373d68a
f8982fc
 
 
373d68a
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
31
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system dependencies needed by OpenCV and other packages
RUN apt-get update && apt-get install -y --no-install-recommends \
    libgl1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender-dev \
    && rm -rf /var/lib/apt/lists/*

# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Expose Gradio's default port
EXPOSE 7860

# Set environment variable for Gradio
ENV GRADIO_SERVER_NAME=0.0.0.0

# Run the Gradio app
CMD ["python", "app.py"]