File size: 1,324 Bytes
43f7000 11a8c1f 43f7000 11a8c1f 43f7000 11a8c1f 43f7000 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
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 Python and dependencies
RUN apt-get install --fix-missing -y python3 python3-pip || apt-get install -y -f
RUN pip install --break-system-packages \
gradio[mcp] \
python-multipart
## Clean
RUN apt-get clean
## Copy MCP server and execute it
COPY app.py /app/app.py
WORKDIR /app
EXPOSE 7860
CMD ["python3", "app.py"]
|