Deploy VAKRA to IBM Code Engine, data-backed by COS (additive, admin-… - #26
Open
anupamamurthi wants to merge 3 commits into
Open
Deploy VAKRA to IBM Code Engine, data-backed by COS (additive, admin-…#26anupamamurthi wants to merge 3 commits into
anupamamurthi wants to merge 3 commits into
Conversation
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What & why
Adds an optional path to run the VAKRA benchmark environment on IBM Code Engine,
with the ~35 GB dataset in IBM COS instead of on every machine. Purely additive — the
local
make/docker-compose flow, the MCP servers, and existing CE/COS deployments areuntouched. All resources are prefixed
vakra-*; every mutating script is gated behindVAKRA_CE_ADMIN=1.Two seams bridged (CE-only)
docker exec(stdio); CE has none, so a newdocker/mcp_http_bridge.pyserves MCP over HTTP at/mcp/<domain>whenSERVE_MODE=http.It spawns a fresh, domain-pinned
mcp_dispatch.pysubprocess per request — sameMCP_DOMAINscoping asdocker exec -e, solist_tools()stays scoped andverify_checksumstill passes. Default (local) path unchanged.DATA_SOURCE=mount(default) mounts the COS bucket via a CE persistent datastore at the exact paths the servers expect;
DATA_SOURCE=syncis a download-to-diskfallback (
docker/cos_sync.py).Contents
deploy/ce/—config.sh,0_push_data_to_cos.py,1_create_bucket_and_pds.sh,2_build_push_image.sh,3_deploy_apps.sh,4_deploy_explorer.sh,5_test_ce.py,teardown.sh,Dockerfile.explorer, and docs (README/RUNBOOK/USING/CHEATSHEET).mcp_client.py(+http transport),benchmark_runner.py(log server URL),tools_explorer/app.py(MCP_CONFIG env),docker/{Dockerfile.unified,entrypoint-unified.sh}(opt-in bridge +
mcp==1.27.0pin),.dockerignore(anchor top-level/data/),benchmark/mcp_connection_config.ce.yaml.Benchmarking against CE
Unchanged runner — only
--mcp-config benchmark/mcp_connection_config.ce.yamldiffers;per-domain scoping is automatic.
Testing
5_test_ce.py: 4/4 capabilities green on CE (cap1=9, cap2=139, cap3/bpo=32, cap4=144 tools).--list-toolsagainst CE verified. Full LLM run is provider-key-gated (openai/watsonx).Usage
Deploy it (admins)
From the repo root, one-time:
ibmcloud login --sso, then create a venv(
python3.12 -m venv .venv && pip install -e ".[agents,mcp,init]" boto3 openai). Then:python deploy/ce/0_push_data_to_cos.py --stream# data → COS (~35 GB, resumable)VAKRA_CE_ADMIN=1 YES=1 deploy/ce/1_create_bucket_and_pds.shVAKRA_CE_ADMIN=1 YES=1 deploy/ce/2_build_push_image.sh# cloud build → ICR (~15 min)VAKRA_CE_ADMIN=1 YES=1 deploy/ce/3_deploy_apps.sh# writes deploy/ce/.ce_urls.envVerify:
source deploy/ce/.ce_urls.env && python deploy/ce/5_test_ce.py→ expect 4/4.Full detail + gotchas: deploy/ce/RUNBOOK.md. One-pager: deploy/ce/CHEATSHEET.md.
Use the deployed env (everyone else)
Get
deploy/ce/.ce_urls.env(the 4 URLs) from an admin, then pick one:• Any MCP client → connect to
<base>/mcp/<domain>(streamable HTTP; health at<base>/healthz).• Benchmark runner →
source .ce_urls.envthenpython benchmark_runner.py --capability_id 2 --domain california_schools \ --mcp-config benchmark/mcp_connection_config.ce.yaml(add a provider + key for a real run).• Hosted explorer → open the vakra-explorer URL and browse/invoke tools in the browser.
Endpoints are public (no auth) — treat URLs as internal. Guide: deploy/ce/USING.md.
SUMMARY: https://ibm-netlify-drop.1gxwxi8kos9y.us-east.codeengine.appdomain.cloud/s/6229b0be/