ace-step + stable-audio-open: deploy music + SFX generation to irv-ml1
Two new audio-generation stacks alongside the TTS slate: ace-step :8210 — Apache 2.0 music generation foundation model (hybrid diffusion + LLM). Lyric-aware multi-minute songs. ~10-12 GB VRAM during inference, A6000-pinned. Custom Dockerfile patches upstream's torch/cu126 resolution bug (--extra-index-url cu126 was falling back to pypi-default cu13 wheels, mismatching torchvision). stable-audio-open :8211 — Stability AI 1.21B latent-diffusion SFX + ambience. Up to 47s clips at 44.1 kHz. ~6 GB VRAM in fp16, A6000-pinned. Custom FastAPI shim around diffusers' StableAudioPipeline (no upstream HTTP server). Dockerfile pins torchsde explicitly — diffusers doesn't pull it as a hard dep but CosineDPMSolverMultistepScheduler needs it.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Stable Audio Open 1.0 inference image.
|
||||
# pytorch/pytorch base ships torch + cuda + cudnn already linked, so
|
||||
# we only layer the diffusers stack + a libsndfile for soundfile + the
|
||||
# fastapi shim. Smaller and faster to build than starting from
|
||||
# nvidia/cuda and pip-installing torch ourselves.
|
||||
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime AS base
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
HF_HOME=/app/hf_cache
|
||||
|
||||
# libsndfile1 is the C lib soundfile binds to. Without it the pip
|
||||
# install of soundfile succeeds but `import soundfile` fails at
|
||||
# runtime with OSError: cannot find libsndfile.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libsndfile1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# protobuf + sentencepiece are pulled in by the T5 text encoder
|
||||
# (Stable Audio Open uses google/t5-base-cb under the hood).
|
||||
# accelerate gates the .to(device) fast path for diffusers.
|
||||
# torchsde is required by CosineDPMSolverMultistepScheduler — diffusers
|
||||
# doesn't pull it as a hard dep; without it, pipeline init fails with
|
||||
# "CosineDPMSolverMultistepScheduler requires the torchsde library".
|
||||
RUN pip install \
|
||||
"diffusers>=0.27.0" \
|
||||
"transformers>=4.40.0" \
|
||||
accelerate \
|
||||
protobuf \
|
||||
sentencepiece \
|
||||
soundfile \
|
||||
torchsde \
|
||||
fastapi \
|
||||
"uvicorn[standard]" \
|
||||
pydantic
|
||||
|
||||
WORKDIR /app
|
||||
COPY server.py /app/server.py
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user