Skip to content

Commit cc15804

Browse files
committed
feat(docker_modules/opencode): Remove opencode model setup script and use upstream instead to keep things up to date
1 parent c0dfa58 commit cc15804

File tree

2 files changed

+15
-76
lines changed

2 files changed

+15
-76
lines changed

docs/docker-modules/opencode.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ opencode
3535

3636
The first time you run OpenCode, it will prompt you to choose and authenticate a model provider.
3737

38-
## Authentication
38+
## Configuring Local Models
3939

40-
The default `compose.yaml` mounts `${HOME}/docker/.opencode` to `/home/user/.opencode` and `${HOME}/docker/.local/share/opencode` to `/home/user/.local/share/opencode` so the installed binary and provider credentials can persist across containers.
40+
Follow the [OpenCode config locations](https://opencode.ai/docs/config/#locations) guide and edit `~/.config/opencode/opencode.json` directly.
41+
42+
The default `compose.yaml` mounts `${HOME}/docker/.config/opencode` to `/home/user/.config/opencode` and `${HOME}/docker/.local/share/opencode` to `/home/user/.local/share/opencode` so the installed binary and provider credentials can persist across containers.
43+
44+
For a local [llama.cpp](https://github.com/ggml-org/llama.cpp) endpoint, add a provider entry like this by downloading and running the setup helper script:
45+
46+
```sh
47+
curl -fsSL https://raw.githubusercontent.com/j3soon/local-llm-notes/refs/heads/main/examples/basic-secure-api/scripts/setup_opencode.sh -o /tmp/setup_opencode.sh
48+
chmod +x /tmp/setup_opencode.sh
49+
/tmp/setup_opencode.sh
50+
```
51+
52+
The script installs the necessary dependencies and sets the `OPENCODE_MODEL` environment variable to point to the local model. After running it, you can start OpenCode as usual and it will use the locally-installed model.
4153

4254
## Privacy
4355

44-
Note that using cloudhosted models may allow your code to be used for training. See the OpenCode privacy policy for details: [privacy policy](https://opencode.ai/docs/zen/#privacy). Additionally, refer to `setup_opencode_llamacpp.sh` for local [llama.cpp](https://github.com/ggml-org/llama.cpp) configuration.
56+
Note that using cloud-hosted models may allow your code to be used for training. See the OpenCode privacy policy for details: [privacy policy](https://opencode.ai/docs/zen/#privacy).
4557

4658
## References
4759

scripts/setup_opencode_llamacpp.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)