Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements | |
| COPY backend/requirements.txt /app/backend/requirements.txt | |
| COPY ml/requirements.txt /app/ml/requirements.txt | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r /app/backend/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/ml/requirements.txt | |
| # Copy code | |
| COPY backend/ /app/backend/ | |
| COPY ml/ /app/ml/ | |
| # Create directories | |
| RUN mkdir -p /app/ml/models /app/ml/data/retraining | |
| # Expose port 7860 (Hugging Face requirement) | |
| EXPOSE 7860 | |
| # Start FastAPI on port 7860 | |
| CMD ["uvicorn", "backend.inference_service:app", "--host", "0.0.0.0", "--port", "7860"] |