FROM python:3.11-slim WORKDIR /app # Install system deps for audio processing RUN apt-get update && apt-get install -y --no-install-recommends \ git ffmpeg libsndfile1 && \ rm -rf /var/lib/apt/lists/* # Install Python deps COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Install evpmr package COPY pyproject.toml . COPY evpmr/ evpmr/ RUN pip install --no-cache-dir -e . # Copy app code and models COPY server.py transkun_wrapper.py ./ COPY saved_models/ saved_models/ # HF Spaces uses port 7860 EXPOSE 7860 # Warm up: download Aria model at build time (optional, saves cold start) # RUN python -c "from evpmr.models.aria_model import AriaMidiModel; AriaMidiModel(device='cpu')" CMD ["python", "server.py"]