docker: add jiwer, langid, easydict, protobuf to baked notebook deps

Continuation of the notebook-dep prebaking: the in-image notebook runner
neutralises pip cells, so declared deps must be prebaked. evaluate's WER
metric imports jiwer (Whisper), DeepSeek-R1 GRPO's reward uses langid,
some vision trust_remote_code files need easydict, and sentencepiece
tokenizer conversion needs protobuf. All pure-Python; torch pin intact.
This commit is contained in:
Daniel Han 2026-06-13 11:32:18 +00:00
commit ea91c7a20b

View file

@ -272,15 +272,20 @@ RUN set -eux \
# matplotlib rides along for the notebook crowd: plotting is table stakes in
# a Jupyter image, and several model repos' trust_remote_code modeling files
# (e.g. DeepSeek-OCR) import it unconditionally.
# soundfile (TTS notebooks read/write audio; bundles libsndfile in its wheel),
# evaluate (Whisper notebook's WER metric), and tensorboard (default
# TrainingArguments report_to backend) are declared by notebook install cells
# that the in-image runner neutralises, so bake them here. All pure-Python or
# self-contained wheels; none names torch, so the cu128 pin is undisturbed.
# These are declared by notebook install cells that the in-image runner
# neutralises (deps are meant to be prebaked), so bake them here. All
# pure-Python or self-contained wheels; none names torch, so the cu128 pin
# is undisturbed:
# soundfile TTS notebooks read/write audio (bundles libsndfile in its wheel)
# evaluate + jiwer Whisper notebook's WER metric (evaluate.load("wer") -> jiwer)
# tensorboard default TrainingArguments report_to backend
# langid DeepSeek-R1 GRPO reward's language-id check
# easydict some vision trust_remote_code modeling files
# protobuf slow->fast tokenizer conversion for sentencepiece models
RUN ${VENV}/bin/uv pip install \
--python ${VENV}/bin/python \
jupyterlab notebook ipywidgets matplotlib \
soundfile evaluate tensorboard
soundfile evaluate jiwer tensorboard langid easydict protobuf
# Audio decode out of the box: the TTS/STT notebooks feed datasets' Audio
# features, which decode through torchcodec. Three traps, all defended: