66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
ollama:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: ollama
|
|
restart: unless-stopped
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama_data:/root/.ollama
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
environment:
|
|
- OLLAMA_HOST=0.0.0.0
|
|
- OLLAMA_KEEP_ALIVE=24h
|
|
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:main-latest
|
|
container_name: litellm
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- ollama
|
|
ports:
|
|
- "4000:4000"
|
|
volumes:
|
|
- ./litellm-config.yaml:/app/config.yaml
|
|
command: ["--config", "/app/config.yaml", "--port", "4000"]
|
|
|
|
claude-code:
|
|
image: node:20-slim
|
|
container_name: claude-code
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- litellm
|
|
environment:
|
|
# Point Claude Code at LiteLLM which fully speaks the Anthropic API
|
|
- ANTHROPIC_BASE_URL=http://litellm:4000
|
|
- ANTHROPIC_API_KEY=ollama
|
|
volumes:
|
|
- workspace:/workspace
|
|
- claude_config:/root/.claude
|
|
working_dir: /workspace
|
|
command: >
|
|
sh -c "npm install -g @anthropic-ai/claude-code &&
|
|
mkdir -p /root/.claude &&
|
|
echo '{\"model\": \"qwen2.5-coder:32b\"}' > /root/.claude/settings.json &&
|
|
echo 'Claude Code ready. Run: claude' &&
|
|
tail -f /dev/null"
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
volumes:
|
|
ollama_data:
|
|
driver: local
|
|
workspace:
|
|
driver: local
|
|
claude_config:
|
|
driver: local
|