-
Notifications
You must be signed in to change notification settings - Fork 1
docs: use mounts for examples #91
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -506,7 +506,7 @@ openshell-image-builder [OPTIONS] <TAG> | |
|
|
||
| ### Claude Code agent + Anthropic models provider | ||
|
|
||
| ``` | ||
| ```sh | ||
| $ openshell-image-builder \ | ||
| --agent claude \ | ||
| --inference anthropic \ | ||
|
|
@@ -525,11 +525,21 @@ $ openshell sandbox create \ | |
| --name claude_anthropic_sandbox \ | ||
| --no-auto-providers \ | ||
| -- claude | ||
|
|
||
| # Or, with podman driver, you can mount the files | ||
| # (https://docs.nvidia.com/openshell/reference/sandbox-compute-drivers#podman-driver-config-mounts) | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:claude_anthropic \ | ||
| --provider claude_anthropic_provider \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \ | ||
| --name claude_anthropic_sandbox \ | ||
| --no-auto-providers \ | ||
| -- claude | ||
| ``` | ||
|
|
||
| ### OpenCode agent + Anthropic models provider | ||
|
|
||
| ``` | ||
| ```sh | ||
| $ openshell-image-builder \ | ||
| --agent opencode \ | ||
| --inference anthropic \ | ||
|
|
@@ -548,45 +558,46 @@ $ openshell sandbox create \ | |
| --name opencode_anthropic_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
|
|
||
| # Or, with podman driver, you can mount the files | ||
| # (https://docs.nvidia.com/openshell/reference/sandbox-compute-drivers#podman-driver-config-mounts) | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:opencode_anthropic \ | ||
| --provider opencode_anthropic_provider \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \ | ||
| --name opencode_anthropic_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
| ``` | ||
|
|
||
| ### Claude Code agent + Vertex AI models provider | ||
|
|
||
| ``` | ||
| ```sh | ||
| $ openshell-image-builder \ | ||
| --agent claude \ | ||
| --inference vertexai \ | ||
| --model claude-sonnet-4-6 \ | ||
| sandbox_image:claude_vertexai | ||
|
|
||
| # change value of ANTHROPIC_VERTEX_PROJECT_ID and CLOUD_ML_REGION | ||
| # also change source paths for mounts | ||
| # NOTE: gcloud credentials are not protected with this method | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:claude_vertexai \ | ||
| --upload . \ | ||
| --env CLAUDE_CODE_USE_VERTEX=1 \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't it create first a and then use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to wait for this to stabilize on openshell (NVIDIA/OpenShell#1752 and NVIDIA/OpenShell#1763 are still open) before to document it |
||
| --env ANTHROPIC_VERTEX_PROJECT_ID=my-gcp-project \ | ||
| --env CLOUD_ML_REGION=global \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false},{"type":"bind","source":"/path/to/.config/gcloud/application_default_credentials.json","target":"/sandbox/.config/gcloud/application_default_credentials.json","read_only":true}]}}' \ | ||
| --name claude_vertexai_sandbox \ | ||
| --no-auto-providers \ | ||
| --no-tty \ | ||
| -- bash -c '(\ | ||
| echo export CLAUDE_CODE_USE_VERTEX=1; \ | ||
| echo export ANTHROPIC_VERTEX_PROJECT_ID=my-gcp-project; \ | ||
| echo export CLOUD_ML_REGION=global \ | ||
| ) >> /sandbox/.bashrc' | ||
|
|
||
| $ openshell sandbox upload \ | ||
| claude_vertexai_sandbox \ | ||
| $HOME/.config/gcloud/application_default_credentials.json \ | ||
| /sandbox/.config/gcloud/application_default_credentials.json | ||
|
|
||
| $ openshell sandbox connect claude_vertexai_sandbox | ||
|
|
||
| sandbox:~$ claude | ||
| -- claude | ||
| ``` | ||
|
|
||
| ### OpenCode agent + Ollama (local models) | ||
|
|
||
| Ollama must be running on the host before starting the sandbox. | ||
|
|
||
| ``` | ||
| ```sh | ||
| $ openshell-image-builder \ | ||
| --agent opencode \ | ||
| --inference ollama \ | ||
|
|
@@ -599,6 +610,15 @@ $ openshell sandbox create \ | |
| --name opencode_ollama_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
|
|
||
| # Or, with podman driver, you can mount the files | ||
| # (https://docs.nvidia.com/openshell/reference/sandbox-compute-drivers#podman-driver-config-mounts) | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:opencode_ollama \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \ | ||
| --name opencode_ollama_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
| ``` | ||
|
|
||
| ### OpenCode agent + OpenAI models provider | ||
|
|
@@ -622,6 +642,16 @@ $ openshell sandbox create \ | |
| --name opencode_openai_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
|
|
||
| # Or, with podman driver, you can mount the files | ||
| # (https://docs.nvidia.com/openshell/reference/sandbox-compute-drivers#podman-driver-config-mounts) | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:opencode_openai \ | ||
| --provider opencode_openai_provider \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \ | ||
| --name opencode_openai_sandbox \ | ||
| --no-auto-providers \ | ||
| -- opencode | ||
| ``` | ||
|
|
||
| To use an OpenAI-compatible endpoint (e.g. Azure OpenAI, a local proxy, or another provider's API): | ||
|
|
@@ -637,34 +667,25 @@ $ openshell-image-builder \ | |
|
|
||
| ### OpenCode agent + Vertex AI models provider | ||
|
|
||
| ``` | ||
| ```sh | ||
| $ openshell-image-builder \ | ||
| --agent opencode \ | ||
| --inference vertexai \ | ||
| --model claude-sonnet-4-6 \ | ||
| sandbox_image:opencode_vertexai | ||
|
|
||
| # change value of GOOGLE_CLOUD_PROJECT and VERTEX_LOCATION | ||
| # also change source paths for mounts | ||
| # NOTE: gcloud credentials are not protected with this method | ||
| $ openshell sandbox create \ | ||
| --from sandbox_image:opencode_vertexai \ | ||
| --upload . \ | ||
| --env GOOGLE_APPLICATION_CREDENTIALS=/sandbox/.config/gcloud/application_default_credentials.json \ | ||
| --env GOOGLE_CLOUD_PROJECT=my-gcp-project \ | ||
| --env VERTEX_LOCATION=global \ | ||
| --driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false},{"type":"bind","source":"/path/to/.config/gcloud/application_default_credentials.json","target":"/sandbox/.config/gcloud/application_default_credentials.json","read_only":true}]}}' \ | ||
| --name opencode_vertexai_sandbox \ | ||
| --no-auto-providers \ | ||
| --no-tty \ | ||
| -- bash -c '(\ | ||
| echo export GOOGLE_CLOUD_PROJECT=my-gcp-project; \ | ||
| echo export VERTEX_LOCATION=global; \ | ||
| echo export GOOGLE_APPLICATION_CREDENTIALS=/sandbox/.config/gcloud/application_default_credentials.json \ | ||
| ) >> /sandbox/.bashrc' | ||
|
|
||
| $ openshell sandbox upload \ | ||
| opencode_vertexai_sandbox \ | ||
| $HOME/.config/gcloud/application_default_credentials.json \ | ||
| /sandbox/.config/gcloud/application_default_credentials.json | ||
|
|
||
| $ openshell sandbox connect opencode_vertexai_sandbox | ||
|
|
||
| sandbox:~$ opencode | ||
| -- opencode | ||
|
|
||
| # select a model with /models | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.