-
Notifications
You must be signed in to change notification settings - Fork 18
feat(deployments): OpenShell sandboxed deployment backend (AIRCORE-872) #662
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
maxdubrinsky
merged 6 commits into
main
from
aircore-872-openshell-deployment-target/md
Jul 30, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9293736
feat(deployments): consume the published openshell SDK
maxdubrinsky 1f11adb
feat(deployments): generate SandboxPolicy for OpenShell deployments
maxdubrinsky 7e4be41
feat(deployments): OpenShell deployment backend
maxdubrinsky f75b049
feat(agents): sandbox-runtime image profiles for `nemo agents package`
maxdubrinsky 135fb35
feat(deployments): wire the local openshell executor
maxdubrinsky d99e6e0
feat(deployments): deploy-sandbox skill and inference.local demo
maxdubrinsky 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
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
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
64 changes: 64 additions & 0 deletions
64
packages/nemo_platform_plugin/src/nemo_platform_plugin/sandbox.py
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,64 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """Cross-plugin contract for sandbox-runtime image requirements. | ||
|
|
||
| A sandbox runtime (e.g. OpenShell) runs an agent image under a supervisor that | ||
| imposes requirements on the image: a dedicated non-root user resolved by name, | ||
| extra OS packages for its network/policy setup, and so on. Those requirements | ||
| are *provider* knowledge, but the *packager* (``nemo agents package``) is what | ||
| physically bakes them into the image. | ||
|
|
||
| To keep the packager provider-agnostic, a provider plugin registers one | ||
| :class:`SandboxImageProfile` under the ``nemo.sandbox_profiles`` entry-point | ||
| group; the packager discovers it by name (via | ||
| :func:`nemo_platform_plugin.discovery.discover_sandbox_profiles`) and renders | ||
| whatever it is handed. The packager never imports the provider. | ||
|
|
||
| These are plain, dependency-light dataclasses so a provider can describe its | ||
| profile without importing the runtime's heavy client libraries. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class SandboxUser: | ||
| """A user (and its primary group) a sandbox runtime requires in the image. | ||
|
|
||
| A runtime typically resolves the user by name, so the uid is not load-bearing; | ||
| ``system=True`` keeps it out of the uid range a packager may reclaim for its own | ||
| default runtime user. | ||
| """ | ||
|
|
||
| name: str | ||
| group: str | None = None | ||
| """Primary group name. Defaults to :attr:`name` when ``None``.""" | ||
|
maxdubrinsky marked this conversation as resolved.
|
||
| system: bool = True | ||
| create_home: bool = True | ||
| home: str | None = None | ||
| """Home directory. Defaults to ``/home/<name>`` when ``None``.""" | ||
| shell: str = "/bin/bash" | ||
|
|
||
| def resolved_group(self) -> str: | ||
| return self.group or self.name | ||
|
|
||
| def resolved_home(self) -> str: | ||
| return self.home or f"/home/{self.name}" | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class SandboxImageProfile: | ||
| """Declarative image requirements for running under a sandbox runtime. | ||
|
|
||
| Registered by a provider plugin under the ``nemo.sandbox_profiles`` | ||
| entry-point group and consumed by ``nemo agents package | ||
| --sandbox-runtime <name>``. | ||
| """ | ||
|
|
||
| name: str | ||
| description: str = "" | ||
| apt_packages: tuple[str, ...] = () | ||
| users: tuple[SandboxUser, ...] = () | ||
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
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
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.