1 Commits

Author SHA1 Message Date
f466a99e69 adds scaleway glm as an alternative to glm from deepinfra 2026-07-02 14:16:29 +00:00
4 changed files with 39 additions and 2 deletions

View File

@@ -26,14 +26,26 @@ drc exec opencode opencode
In the TUI, type `/models` to select a model from the registered weave models. In the TUI, type `/models` to select a model from the registered weave models.
## Layout
- `config/opencode/` - image: Dockerfile + `opencode.json` (mounted live, see below)
- `data/` - persisted opencode state (gitignored)
- `docker-compose.yml` - opencode service
## Updating the config ## Updating the config
`opencode.json` is mounted into the container. After editing: `opencode.json` is mounted into the container, so edits take effect with a restart — no rebuild needed:
``` ```
drc restart opencode drc restart opencode
``` ```
Rebuild only when changing the `Dockerfile` or installed packages:
```
drc build opencode
```
## Caveats ## Caveats
- Copy from the TUI is weird over Docker: To copy text out of the opencode TUI running in a container, I have to do `Shift`+click to select the text, then `Ctrl`+`Shift`+`C` to copy. Plain `COPY` doesn't work. - Copy from the TUI is weird over Docker: To copy text out of the opencode TUI running in a container, I have to do `Shift`+click to select the text, then `Ctrl`+`Shift`+`C` to copy. Plain `COPY` doesn't work.

View File

@@ -0,0 +1,19 @@
FROM node:22-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl ca-certificates python3 \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g \
opencode-ai@1.17.9 \
typescript \
typescript-language-server \
pyright
ENV NODE_PATH=/usr/local/lib/node_modules
COPY opencode.json /root/.config/opencode/opencode.json
WORKDIR /workspace
CMD ["sleep", "infinity"]

View File

@@ -68,6 +68,12 @@
"glm-5.2": { "glm-5.2": {
"tools": true "tools": true
}, },
"scaleway-glm-5.2": {
"tools": true,
"options": {
"max_tokens": 16384
}
},
"kimi-K2.7-code": { "kimi-K2.7-code": {
"tools": true "tools": true
}, },

View File

@@ -2,7 +2,7 @@ version: '3.7'
services: services:
opencode: opencode:
image: redpencil/opencode:0.0.1 build: ./config/opencode/
volumes: volumes:
- ./data/opencode/share:/root/.local/share/opencode - ./data/opencode/share:/root/.local/share/opencode
- ./config/opencode/opencode.json:/root/.config/opencode/opencode.json - ./config/opencode/opencode.json:/root/.config/opencode/opencode.json