Download Dockerfile from batoon/hum: direct link, hf CLI and curl.
- Browser
- Download file 2.5 kB
-
https://huggingface.co/spaces/batoon/hum/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/batoon/hum/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/batoon/hum/resolve/main/Dockerfile
2.5 kB
| FROM python:3.12-slim-bookworm | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| GRADIO_ANALYTICS_ENABLED=False | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg fluidsynth fluid-soundfont-gm libsndfile1 libgomp1 \ | |
| curl ca-certificates p7zip-full && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Full multi-sampled CC0 electric guitar and bass. Pin release archives so a | |
| # changed upstream download cannot silently change audible results. | |
| RUN mkdir -p /opt/soundfonts /tmp/fonts && \ | |
| curl -fL --retry 3 -o /tmp/guitar.7z \ | |
| 'https://github.com/freepats/electric-guitar-FSBS-clean/releases/download/2026-08-07/EGuitarFSBS-clean-SF2-20260807.7z' && \ | |
| echo '6d338afefe0efb629afd9ba28a5c8c129fc28b97ef1b57a31ebceb7bf0e3bf65 /tmp/guitar.7z' | sha256sum -c - && \ | |
| 7z x -y -o/tmp/fonts /tmp/guitar.7z >/dev/null && \ | |
| mv '/tmp/fonts/EGuitarFSBS-clean SF2-20260807/EGuitarFSBS-clean bridge 20260807.sf2' /opt/soundfonts/electric-clean.sf2 && \ | |
| curl -fL --retry 3 -o /tmp/bass.7z \ | |
| 'https://github.com/freepats/electric-bass-YR/releases/download/2019-09-30/FingerBassYR-SF2-20190930.7z' && \ | |
| echo 'f5b5cfe04435a9e9037d1f97d515dc596535acf26637db9579d724cd757f179e /tmp/bass.7z' | sha256sum -c - && \ | |
| 7z x -y -o/tmp/fonts /tmp/bass.7z >/dev/null && \ | |
| mv '/tmp/fonts/FingerBassYR SF2-20190930/FingerBassYR 20190930.sf2' /opt/soundfonts/finger-bass.sf2 && \ | |
| rm -rf /tmp/fonts /tmp/guitar.7z /tmp/bass.7z | |
| # SheetSage2's published code uses the older Transformers API. Separate | |
| # processes keep that runtime independent of YuE2's pinned dependencies. | |
| RUN python -m venv /opt/sheet && /opt/sheet/bin/pip install --no-cache-dir \ | |
| torch==2.8.0 torchaudio==2.8.0 transformers==4.45.2 \ | |
| numpy==1.26.4 scipy==1.15.3 huggingface-hub==0.36.0 \ | |
| safetensors==0.7.0 soundfile==0.13.1 pretty_midi==0.2.11 mido==1.3.3 \ | |
| mir_eval==0.8.2 | |
| RUN python -m venv /opt/yue && /opt/yue/bin/pip install --no-cache-dir \ | |
| 'https://huggingface.co/m-a-p/YuE2-3B/resolve/29b3558dd46954a0cd9021dc76d5c91864a0f1c7/yue2_infer-0.1.5-py3-none-any.whl' | |
| RUN python -m venv /opt/ui && /opt/ui/bin/pip install --no-cache-dir \ | |
| gradio==5.49.1 numpy==1.26.4 scipy==1.15.3 soundfile==0.13.1 \ | |
| librosa==0.11.0 pretty_midi==0.2.11 mido==1.3.3 | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| COPY --chown=user:user . /home/user/app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["/opt/ui/bin/python", "app.py"] | |