Skip to content

[codex] Add GPU sandbox client support#747

Open
thedebugger wants to merge 1 commit into
mainfrom
codex/sbx-gpu-cli
Open

[codex] Add GPU sandbox client support#747
thedebugger wants to merge 1 commit into
mainfrom
codex/sbx-gpu-cli

Conversation

@thedebugger

Copy link
Copy Markdown
Contributor

Summary

Adds GPU sandbox creation support across the Tensorlake clients:

  • CLI: tl sbx create/new --gpus <count> --gpu-model <model>
  • Rust cloud SDK request model: serializes resources.gpus as an array of { count, model }
  • Python SDK: gpus= and gpu_model= on sync, async, and Sandbox.create
  • TypeScript SDK: gpus and gpuModel

The CLI/SDK surface exposes a single GPU model request and sends it as a one-element resources.gpus array, matching the server request shape.

Validation

Local checks:

  • cargo test -p tensorlake-cli gpu -- --nocapture
  • cargo check -p tensorlake -p tensorlake-rust-cloud-sdk-py -p tensorlake-cli
  • make build_rust_py_client
  • PYTHONPYCACHEPREFIX=/tmp/tensorlake-gpu-pycache poetry run python -m unittest tests.sandbox.test_client_rust_backend
  • PYTHONPYCACHEPREFIX=/tmp/tensorlake-gpu-pycache poetry run python -m unittest tests.sandbox.test_client_rust_backend_async
  • npm -C typescript test -- client.test.ts
  • npm -C typescript run typecheck
  • npm -C typescript run build
  • git diff --check

Live dev smoke:

  • CLI created GPU sandbox, ran nvidia-smi -L, then terminated it
  • Python SDK created GPU sandbox, ran nvidia-smi -L, then terminated it
  • TypeScript SDK created GPU sandbox, ran nvidia-smi -L, then terminated it

All three live sandboxes reported GPU 0: NVIDIA A10.

uses its default disk size.
gpus: Number of GPUs to allocate. Must be provided with
``gpu_model``.
gpu_model: GPU model to allocate, such as ``A10``.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would probably be helpful to have a list of exactly supported GPU models so users don't have to guess what to put here. Also presence of gpu_model can enabled --gpus 1 by default.

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