DocsResources and GPUs
v1.16+

Resources and GPUs

Sandboxes consume cluster resources for as long as the backing service run is active. Request only what the session needs and stop it when work is complete.

This page reuses sandbox.yaml and the quick-start project from the Sandbox Quick Start. Each polyaxon run command below starts a new service. Replace the current value of RUN_UUID with the new run UUID if you want to connect to it afterward.

Select a Queue

Use queues to route sandboxes to the right agent, cluster, or resource pool:

polyaxon run -p quick-start -f sandbox.yaml -q agent-name/queue-name

See queues for scheduling behavior.

Request Resources

Set CPU, memory, and accelerator requests under run.container.resources. Presets and cluster policies can patch or constrain these values:

run:
  kind: service
  container:
    image: python:3.11
    resources:
      requests:
        cpu: "1"
        memory: 2Gi
      limits:
        cpu: "2"
        memory: 4Gi
        nvidia.com/gpu: "1"
    command: ["sleep", "infinity"]

For reusable sandbox profiles, prefer presets:

polyaxon run -p quick-start -f sandbox.yaml --presets gpu-dev

Use GPUs

GPU sandboxes are useful for profiling, interactive model debugging, and notebook exploration. Make sure the selected queue can schedule GPU workloads and that the image matches the GPU runtime requirements.

For node selectors, priority, annotations, and other Kubernetes placement controls, see resources scheduling and node scheduling.

Cost Controls

Use timeouts and culling presets for long-running interactive services: