midi-ddsp / Dockerfile
vedmistry's picture
fix: pin note_seq==0.0.3, drop tensorflow-datasets (training only) to escape protobuf triangle
8f0d95a
Raw
History Blame Contribute Delete
1.74 kB
FROM python:3.10-slim
WORKDIR /app
COPY packages.txt /app/packages.txt
RUN apt-get update && \
apt-get install -y --no-install-recommends git gcc libc6-dev build-essential && \
xargs apt-get install -y --no-install-recommends < /app/packages.txt && \
rm -rf /var/lib/apt/lists/*
ENV PIP_NO_BUILD_ISOLATION=1
RUN pip install --no-cache-dir -U pip wheel setuptools==80.9.0
RUN pip install --no-cache-dir numpy==1.23.5
RUN pip install --no-cache-dir llvmlite==0.40.0 numba==0.57.0
RUN pip install --no-cache-dir protobuf==3.20.3
RUN pip install --no-cache-dir tensorflow-cpu==2.12.0
# ddsp deps - note_seq pinned to 0.0.3 (pre protobuf-5 pb2 files)
# tensorflow-datasets omitted (training only, not needed for inference)
RUN pip install --no-cache-dir \
absl-py \
future \
six \
"gin-config>=0.3.0" \
"scipy<=1.10.1" \
"librosa<=0.10" \
"pydub<=0.25.1" \
"mir_eval<=0.7" \
note_seq==0.0.3 \
"hmmlearn<=0.2.7" \
"dill<=0.3.4" \
"cloudml-hypertune<=0.1.0.dev6" \
"tensorflow-probability<=0.19" \
"tflite_support<=0.1"
RUN pip install --no-cache-dir crepe==0.0.12 --no-build-isolation
RUN pip install --no-cache-dir ddsp==3.2.0 --no-deps
RUN PIP_CONSTRAINT="" pip install --no-cache-dir midi-ddsp --no-deps
RUN pip install --no-cache-dir pretty-midi music21 soundfile
RUN pip install --no-cache-dir git+https://github.com/TEAMuP-dev/pyharp.git@v0.3.0
RUN pip install --no-cache-dir gradio==5.28.0
RUN pip install --no-cache-dir --force-reinstall numpy==1.23.5 protobuf==3.20.3
COPY patch_ddsp.py /app/patch_ddsp.py
RUN python /app/patch_ddsp.py
COPY . /app
ENV PORT=7860
EXPOSE 7860
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
CMD ["python", "-u", "app.py"]