ElmahdiJaouali
Fix OpenCV system dependencies in Dockerfile
3ad4945
Raw
History Blame Contribute Delete
618 Bytes
FROM python:3.9-slim
# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libxcb1 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY api/ ./api/
COPY dashboard/ ./dashboard/
COPY .env.example .env
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "api/main.py"]