Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile.agentic-base
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ RUN /app/.venv/bin/python -c "import nmp.core.jobs; import nmp.core.entities; pr
# package historically lagged the plugin packages (e.g. nvidia-nat==1.4.3 vs
# nvidia-nat-core/eval/langchain==1.7.0), which caused ImportErrors at plugin
# discovery (e.g. register_dataset_loader) and crashed `nat start fastapi`.
# NAT 1.7.0 depends on prerelease transitive packages, so allow prereleases for
# this isolated install step.
RUN uv pip install --python /app/.venv/bin/python \
--prerelease=allow \
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
"nvidia-nat[most]==1.7.0" nvidia-nat-atif==1.7.0 nvidia-nat-eval==1.7.0 nvidia-nat-mcp==1.7.0 && \
uv pip install --python /app/.venv/bin/python -e /app/plugins/nemo-agents && \
uv pip install --python /app/.venv/bin/python -e /app/plugins/nemo-agents/examples/calculator-agent && \
Expand Down
8 changes: 5 additions & 3 deletions tests/agentic-use/requirements-nat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
#
# python3.11 -m venv .venv-nat
# source .venv-nat/bin/activate
# pip install -r tests/agentic-use/requirements-nat.txt
# uv pip install --python .venv-nat/bin/python --prerelease=allow \
# -r tests/agentic-use/requirements-nat.txt
# nat --version
#
# OR use uv with an isolated venv:
#
# uv venv .venv-nat --python 3.11
# uv pip install -r tests/agentic-use/requirements-nat.txt --python .venv-nat/bin/python
# uv pip install --python .venv-nat/bin/python --prerelease=allow \
# -r tests/agentic-use/requirements-nat.txt
#
# DOCKER CONTAINER
# ----------------
# Dockerfile.agentic-base installs this automatically during image build:
# uv pip install "nvidia-nat[mcp,eval,langchain]"
# uv pip install --prerelease=allow "nvidia-nat[most]==1.7.0" ...

nvidia-nat[mcp,eval,langchain]
nvidia-nat-atif
35 changes: 35 additions & 0 deletions tests/agentic-use/tests/test_agentic_base_dockerfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Comment thread
mckornfield marked this conversation as resolved.
Outdated
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parents[3]
DOCKERFILE = REPO_ROOT / "Dockerfile.agentic-base"


def _nat_install_command() -> str:
dockerfile = DOCKERFILE.read_text()
start = dockerfile.index("RUN uv pip install --python /app/.venv/bin/python")
end = dockerfile.index("uv pip install --python /app/.venv/bin/python -e /app/plugins/nemo-agents", start)
return dockerfile[start:end]


def test_agentic_base_nat_install_allows_prereleases() -> None:
command = _nat_install_command()

assert "--prerelease=allow" in command
assert command.index("--prerelease=allow") < command.index('"nvidia-nat[most]==1.7.0"')


def test_agentic_base_nat_install_pins_package_family() -> None:
command = _nat_install_command()

for requirement in (
'"nvidia-nat[most]==1.7.0"',
"nvidia-nat-atif==1.7.0",
"nvidia-nat-eval==1.7.0",
"nvidia-nat-mcp==1.7.0",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
):
assert requirement in command
Loading