Skip to content

feat(examples): add pool-code-interpreter demo#362

Open
wangdengshan wants to merge 1 commit intoalibaba:mainfrom
wangdengshan:feat/pool-code-interpreter-demo
Open

feat(examples): add pool-code-interpreter demo#362
wangdengshan wants to merge 1 commit intoalibaba:mainfrom
wangdengshan:feat/pool-code-interpreter-demo

Conversation

@wangdengshan
Copy link
Contributor

Summary

  • Add full end-to-end example showing Pool lifecycle management combined with the Code Interpreter
  • Phase 1: create pool via PoolManager, list pools, wait for warm buffer, auto-scale capacity when CONCURRENCY exceeds pool_max
  • Phase 2: allocate N sandboxes concurrently from the pool and run Python / TypeScript / Go snippets in parallel; report per-task and total wall-time to illustrate pool cold-start advantage
  • Phase 3: kill sandboxes, delete pool (skippable via SKIP_POOL_DELETE=1)
  • Configurable via env vars: SANDBOX_DOMAIN, SANDBOX_API_KEY, SANDBOX_IMAGE, POOL_NAME, CONCURRENCY, SKIP_POOL_DELETE
  • Includes README with setup steps, env var table, Pool CRD YAML reference and annotated example output

Testing

  • e2e / manual verification
  • Verified full lifecycle: pool creation, sandbox allocation from pool, concurrent Python/TypeScript/Go execution, cleanup

Breaking Changes

  • None

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

Full end-to-end example showing Pool lifecycle management combined
with the Code Interpreter:

- Phase 1: create pool via PoolManager, list pools, wait for warm
  buffer, auto-scale capacity when CONCURRENCY exceeds pool_max
- Phase 2: allocate N sandboxes concurrently from the pool and run
  Python / TypeScript / Go snippets in parallel; report per-task
  and total wall-time to illustrate pool cold-start advantage
- Phase 3: kill sandboxes, delete pool (skippable via SKIP_POOL_DELETE=1)

Configurable via env vars: SANDBOX_DOMAIN, SANDBOX_API_KEY,
SANDBOX_IMAGE, POOL_NAME, CONCURRENCY, SKIP_POOL_DELETE

Includes README with setup steps, env var table, Pool CRD YAML
reference and annotated example output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant