Feature Request: Add modal VM Sandbox
Would be nice to have an option to get the VM Sandbox from Modal enables docker etc. inside the sandbox.
I am implementing this on my fork, let me know if you want a PR ?
This feature is implemented by merged PR https://github.com/ColeMurray/background-agents/pull/2016 (merge commit b69be6da0ecf68f2f12590209fd7762a13bf2433).
Select sandbox_provider = "modal-vm" in Terraform, or SANDBOX_PROVIDER=modal-vm for a standalone control plane with the Docker-capable data plane provisioned first. Selection is deployment-wide. The implementation launches a Modal VM, provisions a verified Docker image, and supervises the Docker daemon inside the VM.
Setup and limitations: https://github.com/ColeMurray/background-agents/blob/main/docs/MODAL_DOCKER.md
Focused validation previously run on unchanged main at 02a6bbf1c2720699444d91867026e8b0111ed6fc:
- From
packages/modal-infra:.venv/bin/python -m pytest tests/test_docker_launch.py tests/test_sandbox_launch.py tests/test_modal_sdk_contract.py tests/test_deploy.py -q— 177 passed. Covers VM creation/restoration, Docker image selection, provisioning checks, and real Modal SDK serialization. - From
packages/sandbox-runtime:../modal-infra/.venv/bin/python -m pytest tests/test_docker_service.py tests/test_docker_control.py -q— 24 passed. Covers daemon readiness, lifecycle, and snapshot preparation using simulated Docker processes. - From the repository root:
npm run build -w @open-inspect/shared— passed. - From the repository root:
npm test -w @open-inspect/control-plane -- src/sandbox/providers/modal-backends.test.ts src/sandbox/provider-factory.test.ts --maxWorkers=1— 39 passed. Covers provider selection and backend contracts.
These were local tests; live Modal VM provisioning and actual Docker workloads were not exercised in this validation. No new fix or duplicate PR was needed because the requested feature is already present. Closing as completed.