# Use a lightweight python runtime built on Debian slim FROM python:3.10-slim # Install external OS level binaries required for OpenCV, Mediapipe, and Audio compilation RUN apt-get update && apt-get install -y \ ffmpeg \ libsm6 \ libxext6 \ glib-2.0 \ && rm -rf /var/lib/apt/lists/* # Establish container path WORKDIR /code # Copy packages descriptor file first to cache layers COPY ./backend/requirements.txt /code/requirements.txt # Run pip upgrade installer RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Bundle application sources together inside container paths COPY ./backend /code/backend COPY ./frontend /code/frontend # Hugging Face Spaces exposes port 7860 natively EXPOSE 7860 # Kick off your live Uvicorn microserver bound to port 7860 CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"]