Siren / Dockerfile
Anasbf's picture
Create Dockerfile
136609d verified
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"]