updates
This commit is contained in:
parent
37adbcc96f
commit
60a1bec0df
2 changed files with 112 additions and 99 deletions
|
|
@ -1,99 +1,107 @@
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
# 1. Install System Tools
|
# 1. Install System Tools
|
||||||
# Added pkg-config and libssl-dev (Essential for Rust compilation)
|
# Added pkg-config and libssl-dev (Essential for Rust compilation)
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
git curl build-essential unzip sudo \
|
git curl build-essential unzip sudo \
|
||||||
ffmpeg jq zsh pkg-config libssl-dev \
|
ffmpeg jq zsh pkg-config libssl-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
default-jdk-headless \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
# 2. Install Starship & Aliases
|
|
||||||
RUN curl -sS https://starship.rs/install.sh | sh -s -- -y
|
# 2. Install Starship & Aliases
|
||||||
RUN echo 'eval "$(starship init zsh)"' >> /root/.zshrc
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- -y
|
||||||
RUN echo 'alias ll="ls -al"' >> /root/.zshrc
|
RUN echo 'eval "$(starship init zsh)"' >> /root/.zshrc
|
||||||
# Shortcuts for new tools
|
RUN echo 'alias ll="ls -al"' >> /root/.zshrc
|
||||||
RUN echo 'alias c="cargo"' >> /root/.zshrc
|
# Shortcuts for new tools
|
||||||
RUN echo 'alias g="go"' >> /root/.zshrc
|
RUN echo 'alias c="cargo"' >> /root/.zshrc
|
||||||
|
RUN echo 'alias g="go"' >> /root/.zshrc
|
||||||
# 3. Install 'uv' (Python)
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
# 3. Install 'uv' (Python)
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||||
# 4. Install Bun (JS/TS)
|
|
||||||
ENV BUN_INSTALL="/root/.bun"
|
# 4. Install Bun (JS/TS)
|
||||||
ENV PATH="$BUN_INSTALL/bin:$PATH"
|
ENV BUN_INSTALL="/root/.bun"
|
||||||
RUN curl -fsSL https://bun.sh/install | bash
|
ENV PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
RUN curl -fsSL https://bun.sh/install | bash
|
||||||
# --- NEW SECTION: RUST SETUP ---
|
|
||||||
# 5. Install Rust (Official Script)
|
# --- NEW SECTION: RUST SETUP ---
|
||||||
# Installs Cargo, Rustc, Rustfmt, etc.
|
# 5. Install Rust (Official Script)
|
||||||
ENV RUSTUP_HOME=/root/.rustup
|
# Installs Cargo, Rustc, Rustfmt, etc.
|
||||||
ENV CARGO_HOME=/root/.cargo
|
ENV RUSTUP_HOME=/root/.rustup
|
||||||
ENV PATH="$CARGO_HOME/bin:$PATH"
|
ENV CARGO_HOME=/root/.cargo
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile default
|
ENV PATH="$CARGO_HOME/bin:$PATH"
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile default
|
||||||
# --- NEW SECTION: GO SETUP ---
|
|
||||||
# 6. Install Go (Latest Stable)
|
# --- NEW SECTION: GO SETUP ---
|
||||||
# We target 'linux-arm64' because you are on Apple Silicon (M3).
|
# 6. Install Go (Latest Stable)
|
||||||
ARG GO_VER=1.23.4
|
# We target 'linux-arm64' because you are on Apple Silicon (M3).
|
||||||
RUN curl -OL https://golang.org/dl/go${GO_VER}.linux-arm64.tar.gz && \
|
ARG GO_VER=1.23.4
|
||||||
tar -C /usr/local -xzf go${GO_VER}.linux-arm64.tar.gz && \
|
RUN curl -OL https://golang.org/dl/go${GO_VER}.linux-arm64.tar.gz && \
|
||||||
rm go${GO_VER}.linux-arm64.tar.gz
|
tar -C /usr/local -xzf go${GO_VER}.linux-arm64.tar.gz && \
|
||||||
ENV PATH="/usr/local/go/bin:$PATH"
|
rm go${GO_VER}.linux-arm64.tar.gz
|
||||||
|
ENV PATH="/usr/local/go/bin:$PATH"
|
||||||
# 7. Install OpenCode CLI
|
|
||||||
RUN curl -fsSL https://opencode.ai/install | bash
|
# 6a basex https://files.basex.org/releases/12.2/BaseX122.zip
|
||||||
ENV PATH="/root/.opencode/bin:$PATH"
|
ARG BASEX_VER=12.2/BaseX122.zip
|
||||||
|
RUN curl -fsSL https://files.basex.org/releases/${BASEX_VER} -o temp.zip || { echo "Download failed"; exit 1; } && \
|
||||||
# 8. Install Oh-My-OpenCode
|
unzip temp.zip -d /usr/local || { echo "Extraction failed"; rm temp.zip; exit 1; } && \
|
||||||
RUN bunx oh-my-opencode@latest install --no-tui \
|
rm temp.zip
|
||||||
--claude=no --gemini=no --copilot=no
|
ENV PATH="/usr/local/basex/bin:$PATH"
|
||||||
|
|
||||||
# 9. CONFIG PART 1: Hardware/Providers (opencode.json)
|
# 7. Install OpenCode CLI
|
||||||
# Maps your local ports to providers.
|
RUN curl -fsSL https://opencode.ai/install | bash
|
||||||
RUN mkdir -p /root/.config/opencode && \
|
ENV PATH="/root/.opencode/bin:$PATH"
|
||||||
cat <<EOF > /root/.config/opencode/opencode.json
|
|
||||||
{
|
# 8. Install Oh-My-OpenCode
|
||||||
"plugin": ["oh-my-opencode"],
|
RUN bunx oh-my-opencode@latest install --no-tui \
|
||||||
"theme": "oh-my-opencode",
|
--claude=no --gemini=no --copilot=no
|
||||||
"default_agent": "Sisyphus",
|
|
||||||
"provider": {
|
# 9. CONFIG PART 1: Hardware/Providers (opencode.json)
|
||||||
"local-planner": {
|
# Maps your local ports to providers.
|
||||||
"npm": "@ai-sdk/openai-compatible",
|
RUN mkdir -p /root/.config/opencode && \
|
||||||
"name": "GLM 4.7 (Planner)",
|
cat <<EOF > /root/.config/opencode/opencode.json
|
||||||
"options": { "baseURL": "http://host.docker.internal:9901/v1" },
|
{
|
||||||
"models": { "glm": { "name": "GLM 4.7" } }
|
"plugin": ["oh-my-opencode"],
|
||||||
},
|
"theme": "oh-my-opencode",
|
||||||
"local-oracle": {
|
"default_agent": "Sisyphus",
|
||||||
"npm": "@ai-sdk/openai-compatible",
|
"provider": {
|
||||||
"name": "Kimi K2.5 (Context)",
|
"local-planner": {
|
||||||
"options": { "baseURL": "http://host.docker.internal:9900/v1" },
|
"npm": "@ai-sdk/openai-compatible",
|
||||||
"models": { "kimi": { "name": "Kimi K2.5" } }
|
"name": "GLM 4.7 (Planner)",
|
||||||
},
|
"options": { "baseURL": "http://host.docker.internal:11434/v1" },
|
||||||
"local-coder": {
|
"models": { "GLM-4.7-Flash-GGUF:Q6_K": { "name": "GLM-4.7-hello" } }
|
||||||
"npm": "@ai-sdk/openai-compatible",
|
},
|
||||||
"name": "Qwen3 Next (Coder)",
|
"local-oracle": {
|
||||||
"options": { "baseURL": "http://host.docker.internal:9902/v1" },
|
"npm": "@ai-sdk/openai-compatible",
|
||||||
"models": { "qwen": { "name": "Qwen3 Next" } }
|
"name": "Kimi K2.5 (Context)",
|
||||||
}
|
"options": { "baseURL": "http://host.docker.internal:11434/v1" },
|
||||||
}
|
"models": { "gemma3:4b": { "name": "gemma3:4b" } }
|
||||||
}
|
},
|
||||||
EOF
|
"local-coder": {
|
||||||
|
"npm": "@ai-sdk/openai-compatible",
|
||||||
# 10. CONFIG PART 2: Agent Brains (oh-my-opencode.json)
|
"name": "Qwen3 Next (Coder)",
|
||||||
# Maps Agent Roles to Providers.
|
"options": { "baseURL": "http://host.docker.internal:11434/v1" },
|
||||||
RUN cat <<EOF > /root/.config/opencode/oh-my-opencode.json
|
"models": { "qwen3-coder-next": { "name": "Qwen3 Next" } }
|
||||||
{
|
}
|
||||||
"agents": {
|
}
|
||||||
"sisyphus": { "model": "local-planner/glm" },
|
}
|
||||||
"oracle": { "model": "local-oracle/kimi" },
|
EOF
|
||||||
"librarian": { "model": "local-oracle/kimi" },
|
|
||||||
"build": { "model": "local-coding/qwen" }
|
# 10. CONFIG PART 2: Agent Brains (oh-my-opencode.json)
|
||||||
},
|
# Maps Agent Roles to Providers.
|
||||||
"disabled_agents": ["multimodal-looker"],
|
RUN cat <<EOF > /root/.config/opencode/oh-my-opencode.json
|
||||||
"confirm_dangerous_actions": false
|
{
|
||||||
}
|
"agents": {
|
||||||
EOF
|
"sisyphus": { "model": "local-planner/GLM 4.7 (Planner)" },
|
||||||
|
"oracle": { "model": "local-oracle/kimi" },
|
||||||
WORKDIR /workspace
|
"librarian": { "model": "local-oracle/kimi" },
|
||||||
ENV SHELL=/bin/zsh
|
"build": { "model": "local-coder/qwen3-code-next" }
|
||||||
CMD ["/bin/zsh"]
|
},
|
||||||
|
"disabled_agents": ["multimodal-looker"],
|
||||||
|
"confirm_dangerous_actions": false
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
ENV SHELL=/bin/zsh
|
||||||
|
CMD ["/bin/zsh"]
|
||||||
|
|
|
||||||
5
docker-images/README.md
Normal file
5
docker-images/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t smart-agent -f Dockerfile.agent .
|
||||||
|
```
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue