Spaces:
Runtime error
Runtime error
FROM ubuntu:24.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
## Install dependencies | |
RUN rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean && \ | |
apt-get update && \ | |
apt-get install --fix-missing -y wget unzip curl || apt-get install -y -f && \ | |
apt-get clean | |
## Download and install Audiveris deb package once patched | |
RUN wget https://github.com/Audiveris/audiveris/releases/download/5.6.1/Audiveris-5.6.1-ubuntu24.04-x86_64.deb | |
## Patch the deb package to work without GUI | |
# Unpack the .deb | |
RUN dpkg-deb -R Audiveris-5.6.1-ubuntu24.04-x86_64.deb /tmp/audiveris | |
# Disable post-install script (replace with no-op) | |
RUN echo -e '#!/bin/sh\nexit 0' > /tmp/audiveris/DEBIAN/postinst | |
RUN chmod +x /tmp/audiveris/DEBIAN/postinst | |
# Repack the deb | |
RUN dpkg-deb -b /tmp/audiveris /tmp/audiveris-fixed.deb | |
# Install the modified deb | |
RUN apt-get install --fix-missing -y /tmp/audiveris-fixed.deb || apt-get install --fix-missing -y -f | |
RUN rm Audiveris-5.6.1-ubuntu24.04-x86_64.deb | |
## Install Gradio MCP | |
RUN apt-get install --fix-missing -y python3 python3-pip || apt-get install -y -f | |
# TODO: use a python virtual environment | |
RUN pip install --break-system-packages gradio[mcp] | |
## Clean | |
RUN apt-get clean | |
## Copy MCP server and execute it | |
COPY app.py /app/app.py | |
WORKDIR /app | |
CMD ["python3", "app.py"] | |