Add OpenCode + NVIDIA Nemotron custom app - #473
Open
samhornstein wants to merge 7 commits into
Open
Conversation
samhornstein
marked this pull request as draft
August 24, 2026 22:05
samhornstein
marked this pull request as ready for review
August 24, 2026 22:25
Contributor
|
If this is for a NVIDIA demo, would it be fine staying in/running from a branch? Does it need to be merged into master? |
Author
@pantherman594 Technically speaking, we can pull in a custom app from a feature branch, so we don't need to merge into |
Author
|
Decision: Wait on merge until after demo |
PeterSu92
reviewed
Aug 28, 2026
PeterSu92
reviewed
Aug 28, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
src/opencode-nemotron: code-server with the opencode agent driving a local NVIDIA Nemotron model on Ollama. Nothing leaves the VM. For the NVIDIA dev day demo. Derived fromfeature/applegath/ollama_gemma-4-26B-A4B.This PR:
opencode1.18.22.nemotron-3.5-lightning:30b— 30B MoE, tool calling, 25 GB of weights. Needs an A100 40 GB.resolve-model.sh:/config/.opencode-modelfirst, thenOLLAMA_MODELfromdocker-compose.yaml. Bothstart-ollama.shandconfigure-opencode.shcall it, so the server and the agent config cannot drift.~/.config/opencode/opencode.jsonon create and restart, withshare: "disabled"so sessions never reach opencode's hosted sharing service.OLLAMA_CONTEXT_LENGTH=32768. Tool calls are unreliable below ~16k.Two deviations worth review:
login,cloud,containerImage,containerPort,shmSize, andmemoryLimit(startupscript/butane/050-parse-devcontainer.sh). A custom option stays literal and breaksdocker-compose config. So the default lives inOLLAMA_MODELindocker-compose.yaml. To change the model on an existing app, write the tag to/config/.opencode-modeland restart./configis a volume, so the override survives a restart and a machine-type change. An A100 to L4 move needs a smaller model, and this is how you make that change.ghcr.io/devcontainers/features/java. That feature is currently broken for all 13 apps that use it, includingvscode-with-llmandnemo_jupyter: Microsoft's Java 17 SDKMAN identifier is now17.0.20+1-ms, and the feature's regex rejects the+1segment. Upstream: java: major-only version fails to resolve once a vendor publishes a four-component release (21.0.12.1 → 21.0.12+1-ms) devcontainers/features#1712, fix in #1713. Pinning the digest does not help — the lookup is against SDKMAN's live catalog. The other apps need a separate ticket. This app stays unaffected by the upstream outcome either way;install-java.shonly needs/usr/bin/java.Testing
Deployed to
samh-sandboxona2-highgpu-1g(1x A100 40 GB, us-central1-c):ollama ps→nemotron-3.5-lightning:30b, 25 GB, 100% GPU, context 32768.opencode run "Read hello.txt and tell me exactly how many lines it has"→ agent called its read tool and answered correctly.java17.0.19 andwbon thePATH, sopost-startup.shsucceeds. code-server answers on 8443.resolve-model.shreturnsnemotron-3.5-lightning:30bby default andnemotron-3-nano:4bwith/config/.opencode-modelpresent.configure-opencode.shthen writesollama/nemotron-3-nano:4b. Deleting the file reverts to the default. Theabcuser can write/configdirectly, so the documented command needs nosudo.max_tokens=100the reply stops atfinish_reason=lengthandcontentis empty. With no cap,finish_reason=stopandcontentis'Hello! How can I help you today?'. Nemotron always returns its thinking in Ollama's non-standardreasoningfield, so the README prints both.Not tested:
ollama pullof a changed tag on restart. That path is a single line and reads the verified resolver.Not registered in
test-pr.yaml: CI runsdevcontainer up, which would pull 25 GB on a GPU-less runner.BENCH-9850