first try

This commit is contained in:
augustin_s committed 2026-11-16 13:48:07 +01:00
1 parent 1869672ba2
commit 33ee2af21a
6 files changed
+98

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
opencode/auth.json
opencode/data/
+19
View File
@@ -0,0 +1,19 @@
FROM ghcr.io/anomalyco/opencode:latest
RUN apk add --no-cache \
bash \
ca-certificates \
curl \
fd \
fzf \
git \
jq \
less \
parallel \
ripgrep \
sd \
tree \
yq
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
+7
View File
@@ -0,0 +1,7 @@
{
"PSI": {
"type": "api",
"key": "INSERT API KEY HERE"
}
}
+24
View File
@@ -0,0 +1,24 @@
{
"$schema": "https://opencode.ai/config.json",
"model": "PSI/Qwen3.8-27B",
"provider": {
"PSI": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://ai.psi.ch/api/"
},
"models": {
"Qwen3.8-27B": {
"name": "Qwen3.8-27B"
},
"openai/gpt-oss-120b": {
"name": "OpenAI gpt-oss-120b"
},
"psi_rag_pipeline": {
"name": "PSI RAG Pipeline"
}
}
}
}
}
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
docker build --pull -t opencode-sandbox $@ .
AUTH="opencode/auth.json"
if [ ! -e "$AUTH" ]; then
# cp "$AUTH.template" "$AUTH"
echo "====================================================="
echo "open $AUTH and insert your ai.psi.ch key"
echo "====================================================="
fi
Executable
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
if [[ $# -lt 1 ]]; then
echo "ERROR: provide a workspace directory as argument to mount it into the container"
exit 1
fi
WORKSPACE="$(realpath "$1")"
shift
mkdir -p "$PWD/opencode/data/config"
mkdir -p "$PWD/opencode/data/local/share"
mkdir -p "$PWD/opencode/data/local/state"
CONTAINER_HOME="/root"
docker run -it --rm --net=host \
--name opencode \
\
-v "$WORKSPACE":/workspace \
-w /workspace \
\
-v "$PWD/opencode/data/config":"$CONTAINER_HOME/.config/opencode" \
-v "$PWD/opencode/opencode.json":"$CONTAINER_HOME/.config/opencode/opencode.json:ro" \
\
-v "$PWD/opencode/data/local/share":"$CONTAINER_HOME/.local/share/opencode" \
-v "$PWD/opencode/auth.json":"$CONTAINER_HOME/.local/share/opencode/auth.json:ro" \
\
-v "$PWD/opencode/data/local/state":"$CONTAINER_HOME/.local/state/opencode" \
\
opencode-sandbox "$@"