diff --git a/Dockerfile b/Dockerfile index d3fc9e5..62fe8f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,14 @@ COPY pyproject.toml . COPY src/ src/ RUN --mount=type=cache,target=/root/.cache/pip \ pip install . -# Voice dependencies (faster-whisper, Kokoro TTS, soundfile) — activated at runtime via VOICE_ENABLED -# Install CPU-only torch first so pip doesn't pull full CUDA wheels (~2 GB) for kokoro/transformers. -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install torch --index-url https://download.pytorch.org/whl/cpu \ - && pip install faster-whisper kokoro soundfile \ - && python -m spacy download en_core_web_sm + +# Voice deps (faster-whisper, kokoro, torch, soundfile, spacy) are NOT +# installed in the production image. They added ~2 GB and pulled numpy<2, +# which has no cp314 wheel and broke the slim-image build. +# Voice paths in code are lazily guarded; with VOICE_ENABLED=false (default), +# the app starts cleanly. With voice enabled, missing imports log and +# the feature gracefully degrades. To re-enable voice in a build, install +# the `voice` extra: `pip install .[voice]` — and add an extras step here. # Build the fable-mcp wheel so it can be served for download COPY fable-mcp/ fable-mcp/