Skip to content

Commit 2bd7ea3

Browse files
authored
fix: split training dependency profiles (#1459)
Signed-off-by: Ryan S <267728323+ironcommit@users.noreply.github.com>
1 parent b8abe4f commit 2bd7ea3

27 files changed

Lines changed: 5640 additions & 4526 deletions

docker/Dockerfile.nmp-customizer-tasks

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
7979
# NGC system-site copies inherited from nvcr.io/nvidia/pytorch:26.07-py3.
8080
RUN --mount=type=cache,target=/root/.cache/uv \
8181
uv pip install --python ${VIRTUAL_ENV}/bin/python --no-cache \
82+
--reinstall-package wandb \
8283
--overrides /app/docker/customizer/preserve_base_torch.txt \
8384
"aiohttp>=3.14.1,<4" \
8485
"grpcio>=1.81.1,<2" \
@@ -89,7 +90,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
8990
"tornado>=6.5.7,<7" \
9091
"urllib3>=2.7.0,<3" \
9192
"GitPython>=3.1.58,<4" \
92-
"wandb==0.28.2"
93+
"wandb>=0.28.2"
9394

9495
# CVE cleanup for unused/stale packages from the NGC base image. The task entry
9596
# points import from /opt/venv; scanners still report the shadowed system copies.

docker/Dockerfile.nmp-unsloth-training

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# also missing (common on newer CUDA stacks), logging "FA2 = False /
2727
# Xformers = None".
2828
# 2. Editable installs of the platform glue (nemo-platform SDK, plugin,
29-
# nmp-common, nmp-unsloth) from the in-repo workspace slice.
29+
# nmp-common, nmp-unsloth[integrations]) from the in-repo workspace slice.
3030
#
3131
# Publish target: nmp-unsloth-training
3232
# Default tag: `local` (override via BAKE_TAG at build time).
@@ -164,15 +164,17 @@ RUN chown -R ${USER_UID}:${USER_GID} /app
164164

165165
# Step 2: install the platform glue editably. No [unsloth] extra here — that's
166166
# what we just installed in step 1, and re-triggering it would force the
167-
# resolver to re-evaluate the whole HF stack.
167+
# resolver to re-evaluate the whole HF stack. The [integrations] extra is
168+
# training-runtime only; nmp-api installs nmp-unsloth without extras.
168169
RUN --mount=type=cache,target=/root/.cache/uv \
169170
uv pip install --python ${VIRTUAL_ENV}/bin/python --no-cache \
171+
--reinstall-package wandb \
170172
--overrides /opt/docker/no_override_requirements.txt \
171173
-e /app/sdk/python/nemo-platform \
172174
-e /app/packages/nemo_platform_plugin \
173175
-e /app/packages/nmp_common \
174176
-e /app/packages/nmp_customization_common \
175-
-e "/app/services/unsloth"
177+
-e "/app/services/unsloth[integrations]"
176178

177179
# hf-transfer can pull huggingface-hub 1.x — install then re-pin hub + transformers.
178180
RUN --mount=type=cache,target=/root/.cache/uv \

docker/Dockerfile.safe-synthesizer-tasks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ RUN printf '%s\n' \
122122
"${SAFE_SYNTHESIZER_RUNTIME_PACKAGE}" \
123123
> /tmp/safe-synthesizer-runtime.txt && \
124124
printf '%s\n' \
125-
wandb==0.28.2 \
125+
'wandb>=0.28.2' \
126126
'aiohttp>=3.14.3,<4' \
127127
'cryptography>=50.0.0,<51' \
128128
'pyarrow>=23.0.1,<24' \

docker/automodel/Dockerfile.nmp-automodel-base

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
106106
rm -rf /opt/venv/lib/python*/site-packages/vllm \
107107
/opt/venv/lib/python*/site-packages/vllm-*.dist-info && \
108108
uv pip install \
109+
--reinstall-package wandb \
109110
"aiohttp>=3.13.3,<4" \
110111
"black>=26.3.1,<27" \
111112
"GitPython>=3.1.58,<4" \
@@ -125,7 +126,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
125126
"urllib3>=2.7.0,<3" \
126127
"mlflow-skinny>=3.13.0,<3.14.0" \
127128
"grpcio>=1.81.1,<2" \
128-
"wandb==0.28.2"
129+
"wandb>=0.28.2"
129130

130131
ARG NMP_COLLECT_SOURCES=0
131132
ENV NMP_COLLECT_SOURCES=${NMP_COLLECT_SOURCES}

docker/automodel/no_override_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ safetensors; sys_platform == 'never'
1010
numpy; sys_platform == 'never'
1111

1212
# Keep W&B's bundled wandb-core binary on a build with patched go-git/go-billy.
13-
wandb==0.28.2
13+
wandb>=0.28.2

docker/rl/Dockerfile.nmp-rl-base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ uv pip install --python /opt/nemo_rl_venv/bin/python "opensandbox>=0.1.9" "tenac
260260

261261
# W&B ships a scanner-visible Go binary. Keep it above the fixed go-git/grpc
262262
# and Go stdlib floors even when NeMo-RL's lock has an older wheel.
263-
uv pip install --python /opt/nemo_rl_venv/bin/python "wandb==0.28.2"
263+
uv pip install --python /opt/nemo_rl_venv/bin/python "wandb>=0.28.2"
264264

265265
# NeMo-Gym in the BASE venv, for the DRIVER - not a duplicate of the nemo_gym extra above.
266266
# Sandboxed (mode B) GRPO imports nemo_rl.environments.sandbox in the driver process:
@@ -440,7 +440,7 @@ fi
440440
for py in /opt/ray_venvs/*/bin/python /opt/gym_venvs/*/bin/python; do
441441
[ -x "${py}" ] || continue
442442
if "${py}" -c 'import importlib.util, sys; sys.exit(0 if importlib.util.find_spec("wandb") else 1)'; then
443-
uv pip install --python "${py}" "wandb==0.28.2"
443+
uv pip install --python "${py}" --upgrade-package wandb "wandb>=0.28.2"
444444
fi
445445
done
446446
for d in "${UV_CACHE_DIR}"/archive-v0/*/; do

docker/rl/Dockerfile.nmp-rl-training

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ RUN ln -sfn /opt/nemo_rl_venv /opt/venv
4242
RUN UV_CACHE_DIR=/root/.cache/uv \
4343
uv-glue pip freeze --python /opt/nemo_rl_venv/bin/python --exclude-editable > /tmp/base-python-freeze.txt
4444

45-
# Editable platform glue WITH dependency resolution. The from-source base ships clean package
46-
# metadata, so uv can resolve the glue's real deps (typer, sniffio, ngcsdk, opentelemetry-*,
47-
# sqlalchemy, kubernetes, fastapi, ...) instead of us pinning them by hand.
45+
# Editable platform glue WITH dependency resolution. The [integrations] extra is
46+
# training-runtime only; nmp-api installs nmp-rl without extras. The from-source
47+
# base ships clean package metadata, so uv can resolve the glue's real deps
48+
# (typer, sniffio, ngcsdk, opentelemetry-*, sqlalchemy, kubernetes, fastapi, ...)
49+
# instead of us pinning them by hand.
4850
# To stop uv moving the pinned RL / vLLM / mcore / Gym stack while it does that, freeze the base venv
4951
# first and pass it as --overrides (base versions win over whatever the glue requests). Packages the
5052
# base doesn't have are still installed fresh. `| grep '==' ` drops git/URL installs (TE, flash-attn,
@@ -64,7 +66,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6466
-e /app/packages/nemo_platform_plugin \
6567
-e /app/packages/nmp_common \
6668
-e /app/packages/nmp_customization_common \
67-
-e /app/services/rl
69+
-e "/app/services/rl[integrations]"
6870

6971
ARG NMP_COLLECT_SOURCES=0
7072
ENV NMP_COLLECT_SOURCES=${NMP_COLLECT_SOURCES}

docker/unsloth/no_override_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ accelerate; sys_platform == 'never'
1111
safetensors; sys_platform == 'never'
1212

1313
# Keep W&B's bundled wandb-core binary on a build with patched go-git/go-billy.
14-
wandb==0.28.2
14+
wandb>=0.28.2

e2e/test_nemo_agents_execute_job.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ def test_fabric_agent_invocation_job_runs_and_saves_results(sdk: NeMoPlatform, w
239239
artifacts_members = _tar_member_names(artifacts)
240240
assert _tar_contains(artifacts_members, "adapter-invocation.json")
241241
assert _tar_contains(artifacts_members, "stdout.txt")
242-
assert _tar_contains(artifacts_members, "stderr.txt")
243242

244243
# The run result captures platform-normalized Fabric RunResult details
245244
run_result = json.loads(_download_execute_job_result(sdk, workspace, job_name, "fabric_run_result"))

0 commit comments

Comments
 (0)