mango-disease-api / Dockerfile
AI-Solutions-KK's picture
docker modified
f6a8ffd
# ============================================
# BACKEND: Dockerfile
# ============================================
# HuggingFace Spaces deployment
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies for OpenCV + Voice
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libgomp1 \
libsm6 \
libxext6 \
libxrender-dev \
libgl1 \
espeak \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (for caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files
COPY . .
# Expose port
EXPOSE 7860
# Run FastAPI with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]