# --- HF Space (Docker SDK) - MicroMixer-2 Discord demo # Pinning anything to old versions is the wrong move on Python 3.13: # the stdlib `audioop` is gone and huggingface_hub dropped HfFolder. # We use the latest of everything instead, and keep audioop-lts in # the dep list because Gradio's pydub import still needs `audioop`. FROM python:3.13-slim # Streamlit-style system libs that HF Spaces' own base image normally # ships; harmless to redeclare here. ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 WORKDIR /app # Install Python deps first so we get Docker layer caching on code # changes. COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the app. COPY . . # HF Spaces' default Gradio port. EXPOSE 7860 # `app.py` exposes a `demo` object and runs `demo.launch()` at import # time via the `if __name__ == "__main__"` branch. CMD ["python", "app.py"]