Monorepo-Geruest fuer neun Streamer-Tools plus den Ingest-Daemon, der unter sechs davon liegt. Enthaelt: - docs/: Ueberblick, Architektur, Twitch-Integration, Datenmodell, Roadmap, Setup, Hebel-Analyse und den MVP-Plan "Clip-Knopf" - docs/projects/: je eine Spezifikation pro Tool - docs/decisions/: vier ADRs (TS-Monorepo, SQLite, EventSub/IRC, Docker) - docker/: Image mit ffmpeg und whisper.cpp, abhaengigkeitsfreier Entrypoint mit check-env, fetch-model und calibrate - config/layout.yaml: aus einem VOD-Screenshot eingemessener Facecam-Ausschnitt (440x330 oben links, Chat-Overlay ab x=1270) Noch kein Anwendungscode - Scheibe S0 aus docs/07-mvp-plan.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VTGjd92LsDDWF3frd9FTB
55 lines
1.9 KiB
Docker
55 lines
1.9 KiB
Docker
# Scheibe S0 aus docs/07-mvp-plan.md: Toolchain-Image.
|
|
#
|
|
# Bewusst noch ohne `pnpm install` - es gibt noch keine Abhaengigkeiten und
|
|
# keine Lockfile. Der Entrypoint kommt mit reinem Node aus. Sobald in S1
|
|
# echter Code dazukommt, wird hier eine deps-Stufe ergaenzt.
|
|
|
|
# ---------- whisper.cpp bauen ----------
|
|
FROM debian:bookworm-slim AS whisper
|
|
ARG WHISPER_VERSION=v1.7.4
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential cmake git ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN git clone --depth 1 --branch ${WHISPER_VERSION} \
|
|
https://github.com/ggerganov/whisper.cpp /src
|
|
WORKDIR /src
|
|
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release -DWHISPER_BUILD_TESTS=OFF \
|
|
-DWHISPER_BUILD_EXAMPLES=ON \
|
|
&& cmake --build build --config Release -j"$(nproc)" \
|
|
&& mkdir -p /out \
|
|
&& cp build/bin/whisper-cli /out/ \
|
|
&& (cp build/src/libwhisper.so* /out/ 2>/dev/null || true) \
|
|
&& (cp build/ggml/src/libggml*.so /out/ 2>/dev/null || true)
|
|
|
|
# ---------- Laufzeit ----------
|
|
FROM node:22-bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ffmpeg fonts-dejavu-core ca-certificates curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=whisper /out/ /usr/local/lib/whisper/
|
|
RUN ln -s /usr/local/lib/whisper/whisper-cli /usr/local/bin/whisper-cli \
|
|
&& echo /usr/local/lib/whisper > /etc/ld.so.conf.d/whisper.conf \
|
|
&& ldconfig
|
|
|
|
WORKDIR /app
|
|
COPY docker/ ./docker/
|
|
COPY package.json ./
|
|
|
|
# Die Datenbank und die Sprachmodelle liegen in benannten Volumes, nicht im
|
|
# Bind-Mount - siehe docs/decisions/ADR-0004-docker.md
|
|
ENV WHISPER_BIN=/usr/local/bin/whisper-cli \
|
|
MODEL_DIR=/models \
|
|
DB_DIR=/db \
|
|
WORK_DIR=/work \
|
|
CLIPS_DIR=/app/data/clips \
|
|
REPLAY_DIR=/replay \
|
|
CONFIG_DIR=/app/config \
|
|
NODE_ENV=production
|
|
|
|
EXPOSE 4780 4790 4791 4792
|
|
|
|
ENTRYPOINT ["node", "/app/docker/entrypoint.js"]
|
|
CMD ["help"]
|