Spaces:
Runtime error
Runtime error
| FROM python:3.8-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| COPY packages.txt /app/packages.txt | |
| RUN apt-get update && \ | |
| xargs apt-get install -y --no-install-recommends < /app/packages.txt && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY requirements.txt /app/requirements.txt | |
| ENV PIP_NO_BUILD_ISOLATION=1 | |
| RUN pip install --no-cache-dir -U pip wheel Cython | |
| RUN pip install --no-cache-dir setuptools==59.8.0 | |
| RUN pip install --no-cache-dir numpy==1.23.5 | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| RUN pip install --no-cache-dir --no-build-isolation madmom | |
| # Apply madmom patch | |
| COPY patch_madmom.py /app/patch_madmom.py | |
| RUN python /app/patch_madmom.py | |
| RUN python -c "import madmom; print('madmom import OK')" | |
| # Copy the rest of the app | |
| COPY . /app | |
| # Set working directory to chord recognition repo so model files are found | |
| WORKDIR /app/ChordRecognitionMIDITrainedExtractor | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["python", "/app/app.py"] | |