-
Notifications
You must be signed in to change notification settings - Fork 18
feat(agents): add nemo agents package container packaging command
#14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
df734fc
feat(agents): add `nemo agents package` container packaging command
arpitsardhana 603b006
fix(agents): address PR #14 review — soft-warn unknown workflow type,…
arpitsardhana 8e23bff
fix(agents): address PR #14 follow-up review — base image, dockerigno…
arpitsardhana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Managed by `nemo agents package` — safe to delete if you take ownership. | ||
| .env | ||
| .env.* | ||
| *.pem | ||
| *.key | ||
| credentials.json | ||
| .git/ | ||
| .gitignore | ||
| __pycache__/ | ||
| *.pyc | ||
| .pytest_cache/ | ||
| .mypy_cache/ | ||
| .ruff_cache/ | ||
| *.egg-info/ | ||
| dist/ | ||
| build/ | ||
| .venv/ | ||
| node_modules/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Managed by `nemo agents package` — safe to delete if you take ownership. | ||
| ARG BASE_IMAGE_URL=nvcr.io/nvidia/base/ubuntu | ||
|
arpitsardhana marked this conversation as resolved.
|
||
| ARG BASE_IMAGE_TAG=noble-20260217 | ||
| ARG PYTHON_VERSION=3.13 | ||
| ARG NAT_VERSION=1.6.0 | ||
| FROM ${BASE_IMAGE_URL}:${BASE_IMAGE_TAG} | ||
| ARG PYTHON_VERSION | ||
| ARG NAT_VERSION | ||
|
|
||
| COPY --from=ghcr.io/astral-sh/uv:0.8.15 /uv /uvx /bin/ | ||
|
arpitsardhana marked this conversation as resolved.
|
||
|
|
||
| ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
|
||
| # Keep the uv-managed Python in a world-readable location and use copy | ||
| # link-mode so the venv is self-contained (no cross-directory symlinks), | ||
| # letting the non-root runtime user exec it without needing /root access. | ||
| ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python \ | ||
| UV_LINK_MODE=copy | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends g++ gcc ca-certificates curl && \ | ||
| update-ca-certificates && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt | ||
| ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt | ||
|
|
||
| WORKDIR /workspace | ||
|
|
||
| COPY ./ /workspace | ||
|
|
||
| RUN --mount=type=cache,id=uv_cache,target=/root/.cache/uv,sharing=locked \ | ||
| uv venv --python ${PYTHON_VERSION} /workspace/.venv && \ | ||
| . /workspace/.venv/bin/activate && \ | ||
| test -n "${NAT_VERSION}" || { echo "NAT_VERSION build-arg is required" >&2; exit 1; } && \ | ||
| uv pip install --prerelease=allow "nvidia-nat[most]==${NAT_VERSION}" && \ | ||
| chmod -R a+rX /opt/uv /workspace/.venv | ||
|
|
||
| LABEL org.opencontainers.image.title="hello_world" \ | ||
| org.opencontainers.image.version="26.06.01" \ | ||
| org.opencontainers.image.authors="NeMo Agents Team" \ | ||
| org.opencontainers.image.created="2026-06-01T10:11:07-07:00" \ | ||
| org.opencontainers.image.description="react_agent agent" \ | ||
| org.opencontainers.image.revision="40924998df45aef404781ca39c9bdd9000016bb7" \ | ||
| org.opencontainers.image.source="git@github.com:NVIDIA-NeMo/nemo-platform.git" \ | ||
| com.nemo.agent.id="9ee8d3b15822" \ | ||
| com.nemo.agent.framework="nemo_agent_toolkit" \ | ||
| com.nemo.agent.nat-version="1.6.0" \ | ||
| com.nemo.agent.contract-version="0.1.0" | ||
|
|
||
| ENV NAT_CONFIG_FILE=/workspace/hello_world.yaml | ||
|
|
||
| ENV PATH="/workspace/.venv/bin:$PATH" | ||
|
|
||
| RUN if getent passwd 1000 >/dev/null; then userdel -rf "$(getent passwd 1000 | cut -d: -f1)" 2>/dev/null || true; fi && \ | ||
| if getent group 1000 >/dev/null; then groupdel -f "$(getent group 1000 | cut -d: -f1)" 2>/dev/null || true; fi && \ | ||
| groupadd -g 1000 agent && useradd -u 1000 -g agent -m agent && \ | ||
| chown -R agent:agent /workspace | ||
| USER agent | ||
|
|
||
| ENTRYPOINT ["sh", "-c", "exec nat serve --config_file=$NAT_CONFIG_FILE --host 0.0.0.0"] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| functions: | ||
| # Add a tool to search wikipedia | ||
| wikipedia_search: | ||
| _type: wiki_search | ||
| max_results: 2 | ||
|
|
||
| llms: | ||
| # Tell NeMo Agent Toolkit which LLM to use for the agent | ||
| nim_llm: | ||
| _type: nim | ||
| model_name: nvidia/nemotron-3-nano-30b-a3b | ||
| temperature: 0.0 | ||
| chat_template_kwargs: | ||
| enable_thinking: false | ||
|
|
||
| workflow: | ||
| # Use an agent that 'reasons' and 'acts' | ||
| _type: react_agent | ||
| # Give it access to our wikipedia search tool | ||
| tool_names: [wikipedia_search] | ||
| # Tell it which LLM to use | ||
| llm_name: nim_llm | ||
| # Make it verbose | ||
| verbose: true | ||
| # Retry up to 3 times | ||
| parse_agent_response_max_retries: 3 |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.