Spaces:
Sleeping
Sleeping
File size: 810 Bytes
bf17f74 | 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
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"] |