File size: 1,207 Bytes
ea8c728 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | services:
openevolve:
build: .
image: openevolve
# Pass API keys from host environment (set in .env or shell)
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
volumes:
# Mount project dir so code changes take effect without rebuilding
- .:/app
# Persist evolution output across runs
- ./output:/app/output
network_mode: host
# Default: run the function_minimization example
# Override with: docker compose run openevolve <initial.py> <evaluator.py> --config ...
command: >
examples/function_minimization/initial_program.py
examples/function_minimization/evaluator.py
--config examples/function_minimization/config.yaml
--iterations 10
# Interactive shell for debugging / exploration
shell:
build: .
image: openevolve
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
volumes:
- .:/app
- ./output:/app/output
network_mode: host
entrypoint: /bin/bash
stdin_open: true
tty: true |