Skip to content

feat: add e2b template#394

Merged
Marvin-Cypher merged 1 commit into
Phala-Network:mainfrom
phala-agent:feat/template-e2b
May 29, 2026
Merged

feat: add e2b template#394
Marvin-Cypher merged 1 commit into
Phala-Network:mainfrom
phala-agent:feat/template-e2b

Conversation

@phala-agent
Copy link
Copy Markdown
Contributor

Summary

  • Add the e2b prebuilt template with a CPU-safe Python SDK verifier
  • Install/import real e2b==2.25.0 and e2b-code-interpreter==2.7.0 packages without creating sandboxes or requiring credentials
  • Add upstream E2B icon and one templates/config.json entry routed to the Phala prebuilt template path

Validation

  • python3 templates/validate.py
  • docker compose -f templates/prebuilt/e2b/docker-compose.yml config >/tmp/e2b-compose-config.out
  • git diff --check origin/main...HEAD
  • Static audit: config id uniqueness, icon presence, no env_file, no host bind mounts, no Docker socket, no privileged mode, no GPU/device request, no secret defaults, no Sandbox.create(...)/run_code(...) verifier calls

Phala Cloud Smoke

  • Deployed with phala deploy --profile hermes-admin-cvm-check --name auto-template-test-e2b-0529-1133 --compose templates/prebuilt/e2b/docker-compose.yml --instance-type tdx.small --node-id 12 --wait --no-public-logs --no-public-sysinfo --json
  • CVM: cvm_zjdzb6Kv
  • VM UUID: c8c581ff-5aa9-4b33-80d2-4a88fd780d79
  • App ID: e38367091b2fe395822be88098b2881550f44d07
  • Node: prod7 / node id 12
  • phala ps reached dstack-app-1 running and healthy
  • Endpoint probes passed:
    • GET /healthz -> HTTP 200, service=e2b-sdk-verifier, ok=true
    • GET /demo -> HTTP 200, sandbox_created=false, run_code_called=false, local Result formats text,json
    • GET /v1/models -> HTTP 200, model id e2b-local-sdk-verifier
  • Cleanup verified: phala cvms delete cvm_zjdzb6Kv --force --json; follow-up get returned The requested CVM was not found

cc @Marvin-Cypher for review.

@phala-agent
Copy link
Copy Markdown
Contributor Author

cc @Marvin-Cypher for review.

Copy link
Copy Markdown
Contributor

@Marvin-Cypher Marvin-Cypher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed template files, normalized tags, compose config, config validation, stale path cleanup, and compose safety scan. Checks are passing.

@Marvin-Cypher Marvin-Cypher merged commit 81db4e4 into Phala-Network:main May 29, 2026
2 checks passed
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.

2 participants