k8s: add nemo-training deployment (interactive, replicas:0) - #15
Open
wangchen615 wants to merge 2 commits into
Open
k8s: add nemo-training deployment (interactive, replicas:0)#15wangchen615 wants to merge 2 commits into
wangchen615 wants to merge 2 commits into
Conversation
Interactive training pod on its own H100. Scale-to-zero by default (replicas: 0); user scales up manually via `oc scale`, shells in with `oc rsh`, runs training or the nemo2riva conversion, then scales back to 0 to stop H100 billing. - Image: nvcr.io/nvidia/nemo:25.04 (pulled from nvcr.io via the namespace ngc-secret linked to the default SA). - Command: sleep infinity — keeps the pod alive for interactive use. No Service, no Route — network-internal only. - Mounts: vllm-model-cache at /models (shared; also where .riva output files land for the riva-stt deployment to pick up) and nemo-training-data at /data (training-only). - Resources: 4-16 CPU, 32-64Gi RAM, 1x H100. Heavier RAM than serving pods because DataLoader workers + dataset shards + checkpoint staging. - 8Gi tmpfs at /dev/shm for PyTorch DataLoader IPC. - Standard labels + purpose annotation, matching the PVC template. Closes #8 Part of #5 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
5 tasks
Contributor
Author
|
Note This review was generated by Gemini CLI. Review for PR #15: k8s: add nemo-training deployment (interactive, replicas:0)Technical Feedback:
Operational Note:
Recommendation:
|
wangchen615
commented
May 6, 2026
wangchen615
left a comment
Contributor
Author
There was a problem hiding this comment.
Note
This review was generated by Codex.
k8s/nemo-training-deployment.yaml:22-24The new standard labels are only applied to the Deployment object, not tospec.template.metadata.labels. Deployment metadata labels do not propagate to pods, so any pod-level selection, cleanup, or observability that expectsapp.kubernetes.io/part-of=accent-sttorapp.kubernetes.io/component=trainingwill miss the actual training pod. If those labels are meant to be part of the new template, they should be duplicated on the pod template as well.
Codex review flagged that the app.kubernetes.io/part-of and /component labels were only set on the Deployment object. Deployment.metadata.labels do not propagate to Pods, so selectors and observability tooling looking for those labels on pods would not match. Duplicate the labels under spec.template.metadata.labels so they are present on both the Deployment object and the Pods it creates. Addresses Codex review feedback on PR #15. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
k8s/nemo-training-deployment.yaml: interactive NeMo Framework pod for LoRA fine-tuning and the one-shotnemo2rivaconversion step.nvcr.io/nvidia/nemo:25.04. Requiresngc-secretlinked to the default SA (see CLAUDE.md § NGC Registry Access). See caveat below — this link is currently missing on NERC.replicas: 0by default — scale up manually, shell in viaoc rsh, run training, scale back. Matches the "scale up / use / scale down" workflow for the existing TTS deployments.sleep infinity. No Service, no Route — access is cluster-internal viaoc rshonly.vllm-model-cacheat/models(shared with serving; also where.rivaoutput files land for the upcomingriva-sttdeployment to consume).nemo-training-dataat/data(training-only, from PR k8s: add nemo-training-data PVC (120Gi) #14)./dev/shmfor PyTorch DataLoader IPC.app.kubernetes.io/part-of: accent-stt,/component: training) on both the Deployment object AND the pod template (Codex-review follow-up in commit d6fff39).What this PR does NOT cover
This PR provides the infrastructure only — a NeMo Framework pod with PVCs mounted and a GPU attached. It explicitly does not include:
oc rsyncvs.huggingface-cli download, manifest format conversion between this repo'smanifest.jsonschema and NeMo's{audio_filepath, duration, text}expectation).exp_manager.exp_dir=/data/experiments/<run_id>/).nemo2rivahandoff procedure for converting trained checkpoints into.rivamodel files for theriva-sttdeployment.All of these are tracked in #18 (training runbook). That issue should be completed after at least one end-to-end training run succeeds on NERC, so the commands are validated rather than guessed.
Caveat discovered during PR authoring
oc describe sa defaulton the NERC project namespace currently shows onlydefault-dockercfg-ch6wgas an image pull secret. Thengc-secretwas created (46h ago, confirmedoc get secret ngc-secret) but is not linked to the default ServiceAccount. Before this Deployment can pullnvcr.io/nvidia/nemo:25.04, someone needs to run:This is the step documented in CLAUDE.md § NGC Registry Access (step 5). Flagging so the merge + apply sequence is clear.
Test plan
uv run pre-commit run --files k8s/nemo-training-deployment.yamlpasses (yamllint green).ngc-secretto default SA on NERC (oc secrets link default ngc-secret --for=pull).oc apply -f k8s/nemo-training-deployment.yamlsucceeds.oc get deployment nemo-trainingshowsREADY 0/0(scale-to-zero by design).oc scale deployment nemo-training --replicas=1→ pod reachesRunning 1/1within ~3-5 min (first pull: ~15GB image).oc rsh deployment/nemo-traininggives a shell;nvidia-smishows 1 H100;python -c "import nemo.collections.asr"imports cleanly.oc get pod -l app.kubernetes.io/part-of=accent-sttreturns the nemo-training pod.oc scale deployment nemo-training --replicas=0.Closes #8
Part of #5
Depends on #6 (NGC pull secret infrastructure — docs merged), #7 (PVC — merged).
Unblocks #9 (Riva deployment needs this pod to run
nemo2rivaonce).See also #18 (training runbook — follow-up after at least one training run succeeds).
🤖 Generated with Claude Code