Sign inSign up

docker/sbx-kit-opencode-model-runner-mixin:1.18.32

Multi-platform
Manifest digest

sha256:a1536a99effb7e42b3625c188fdb261de54b6c4f2bbacbf6e10776e4724955cf

Last pushed

9 days by cdupuis

Type

Sandbox Kit

Manifest digest

sha256:a1536a99effb7e42b3625c188fdb261de54b6c4f2bbacbf6e10776e4724955cf

yaml
schemaVersion: "3"
displayName: OpenCode (Docker Model Runner) (mixin)
description: OpenCode wired to a local Docker Model Runner as a mixin -- the agent in an overlay with the provider config that points it at the host's OpenAI-compatible endpoint and discovers every pulled model. Layer it onto a shell base and run `opencode`.
sourceUrl: https://docs.docker.com/ai/model-runner/
version: 1.18.32
kind: mixin
provides:
    - [email protected]
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        runtime:
            allow:
                - host.docker.internal:12434
                - registry.npmjs.org
    - type: com.docker.sandbox/lifecycle@1
      config:
        files:
            - content: |
                {
                  "$schema": "https://opencode.ai/config.json",
                  "plugin": [
                    ["opencode-models-discovery", {
                      "smartModelName": false
                    }]
                  ],
                  "provider": {
                    "dmr": {
                      "npm": "@ai-sdk/openai-compatible",
                      "name": "Docker Model Runner",
                      "options": {
                        "baseURL": "http://host.docker.internal:12434/v1",
                        "modelsDiscovery": {
                          "enabled": true
                        }
                      }
                    }
                  }
                }
              description: Configure OpenCode to use the local Docker Model Runner
              mode: "0644"
              path: /home/agent/.config/opencode/opencode.json
    - type: com.docker.sandbox/agent-context@1
      config:
        contentFile: /usr/share/sandbox/kit/opencode-model-runner-mixin/opencode-model-runner-mixin-context.md
args:
    version:
        default: 1.18.32
        description: OpenCode release the base template is expected to carry
        pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
        buildArg: EXPECTED_OPENCODE_VERSION