Files
stemify/server/stemd.Dockerfile
T
ClericalErrorandClaude Opus 5.5 45bc0eefe0 Rename everything to Stemify, and add a README
- Python package stemroller/ -> stemify/, Android package com.stemroller.mobile ->
  com.stemify.mobile, app names, QML module, icons, desktop entries, MPRIS and Plex
  product names
- Done-markers are now .stemify.json; stemd renames the old ones once at startup so
  songs separated before the rename aren't separated again
- A top-level README covering the server, the Android and Android Auto app, the EQ,
  Stem Now and the desktop apps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:24:56 -07:00

25 lines
1.6 KiB
Docker

# stemd: separates new music into stems on the server's NVIDIA GPU (see stemd.py).
# Build from the repo root, since it needs the stemify package:
# docker build -f server/stemd.Dockerfile -t stemd .
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
# cu126 runs on NVIDIA driver 525 and up. TORCH_INDEX=cpu builds a small GPU-less image for testing.
ARG TORCH_INDEX=cu126
RUN pip install --no-cache-dir torch==2.14.1 torchvision==0.29.1 --index-url https://download.pytorch.org/whl/${TORCH_INDEX}
COPY server/stemd-requirements.txt /tmp/
# Everything is pinned, so --no-deps keeps pip from swapping torch for a non-CUDA build.
# gcc is only for diffq, which has no wheel.
RUN apt-get update && apt-get install -y --no-install-recommends gcc libc6-dev \
&& pip install --no-cache-dir --no-deps -r /tmp/stemd-requirements.txt && pip check \
&& apt-get purge -y gcc libc6-dev && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
COPY stemify/__init__.py stemify/catalog.py stemify/library_core.py /app/stemify/
COPY stemify/worker/__init__.py stemify/worker/__main__.py stemify/worker/audio_io.py \
stemify/worker/backends.py /app/stemify/worker/
COPY server/stemd.py /app/server/
ENV MUSIC_DIR=/music STEMS_DIR=/stems STATE_DIR=/state MODELS_DIR=/models \
TORCH_HOME=/models/torch HF_HOME=/models/hf NUMBA_CACHE_DIR=/tmp/numba HOME=/tmp \
PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PYTHONWARNINGS=ignore::FutureWarning
# Unraid shares belong to nobody:users.
USER 99:100
CMD ["python", "/app/server/stemd.py"]