mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
830d8472ca
* docs(models): add claude-code Docker recipe with host Max Plan auth Adds a 'Running with host Max Plan auth in Docker (Linux)' subsection under the existing Claude Code Setup docs. Documents the bind-mount surface required to run HINDSIGHT_API_LLM_PROVIDER=claude-code inside the standalone image: host claude CLI, single-file credential mounts, the v2.1.128+ binary override for the bundled-binary protocol issue, and the post-run chown/symlink steps. Restates the personal-use-only constraint inline so the Docker recipe isn't read as a production pattern. Verified on linux/amd64 per the contributor's report; macOS and Windows paths are noted as not yet covered. Closes #1480 * refactor: move claude-code Docker recipe from docs to docker/docker-compose/ Instead of documenting the Docker recipe inline in models.mdx, create a dedicated docker/docker-compose/claude-code/ setup following the existing pattern (custom-models, external-pg, etc.). - docker-compose.yaml: converts the docker run command into a Compose service with all bind mounts, env vars, and ports - README.md: full documentation including prerequisites, quick start, post-setup steps, and detailed notes on every bind mount - Reverts the models.mdx addition per review feedback
45 lines
2.2 KiB
YAML
45 lines
2.2 KiB
YAML
name: hindsight-claude-code
|
|
# Run Hindsight with the claude-code LLM provider, using your host machine's
|
|
# Claude Pro/Max subscription credentials. Linux/amd64 only for now.
|
|
#
|
|
# Quick start:
|
|
# docker compose -f docker/docker-compose/claude-code/docker-compose.yaml up -d
|
|
#
|
|
# See README.md for prerequisites, post-setup steps, and important caveats.
|
|
|
|
services:
|
|
hindsight:
|
|
image: ghcr.io/vectorize-io/hindsight:latest
|
|
container_name: hindsight-claude-code
|
|
user: "${HOST_UID:-1000}:${HOST_GID:-1000}"
|
|
ports:
|
|
- "127.0.0.1:8888:8888"
|
|
- "127.0.0.1:9999:9999"
|
|
environment:
|
|
HOME: /home/hindsight
|
|
USER: hindsight
|
|
LOGNAME: hindsight
|
|
PATH: /usr/local/bin:/usr/bin:/bin:/app/api/.venv/bin
|
|
HINDSIGHT_API_LLM_PROVIDER: claude-code
|
|
volumes:
|
|
# ── Persistent data ────────────────────────────────────────────
|
|
# Writable pg0 data directory. Must be writable by HOST_UID.
|
|
- ${HOME:-.}/.hindsight-docker:/home/hindsight/.pg0
|
|
|
|
# ── Claude credentials (read-only, single-file mounts) ────────
|
|
# A whole-directory :ro mount of ~/.claude silently breaks the
|
|
# CLI, which writes session/project state at runtime — so we
|
|
# mount only the two credential files.
|
|
- ${HOME}/.claude/.credentials.json:/home/hindsight/.claude/.credentials.json:ro
|
|
- ${HOME}/.claude.json:/home/hindsight/.claude.json:ro
|
|
|
|
# ── Claude CLI install (read-only) ─────────────────────────────
|
|
- ${HOME}/.local/share/claude:/home/hindsight/.local/share/claude:ro
|
|
|
|
# ── SDK bundled-binary override ────────────────────────────────
|
|
# The claude-agent-sdk 0.5.x image bundles v2.1.121 which has a
|
|
# protocol incompatibility in containers. Override it with the
|
|
# host's v2.1.128+ binary. Drop this mount once claude-agent-sdk
|
|
# ships with v2.1.128+.
|
|
- ${HOME}/.local/share/claude/versions/${CLAUDE_CLI_VERSION:-2.1.128}:/app/api/.venv/lib/python3.11/site-packages/claude_agent_sdk/_bundled/claude:ro
|