harbor

Tasks

Managing Resources

Declare CPU, memory, storage, GPU, and TPU requirements in tasks and control how Harbor applies them per environment provider.

Tasks declare resources in task.toml. Harbor applies CPU and memory using enforcement policies; storage, GPU, and TPU requests are passed through when the provider supports them.

Task fields

[environment]
cpus = 2
memory_mb = 4096
storage_mb = 10240
gpus = 1
gpu_types = ["H100", "A100"]

[environment.tpu]   # optional; GKE only
type = "v6e"
topology = "2x4"
FieldDescription
cpusCPU count
memory_mbRAM in MB
storage_mbEphemeral disk in MB
gpusGPU count
gpu_typesAcceptable GPU types (optional)
tpu.typeTPU accelerator type — alias (v6e, trillium, v4) or GKE label (tpu-v6e-slice)
tpu.topologyTPU topology as NxM or NxMxK (required; chip count = product of dimensions)

All fields are optional. Omitted fields use the provider's default sizing — Harbor does not inject defaults.

Separate verifier sandboxes can set their own values under [verifier.environment]. See Separate verifier environments.

Enforcement policies

CPU and memory each get an independent policy. Set them via --cpus / --memory, or cpu_enforcement_policy / memory_enforcement_policy in job or trial config.

PolicyMeaningRequires cpus / memory_mb?
autoUse the provider's default modeNo
limitHard ceiling onlyYes
requestReservation only, no ceilingYes
guaranteeBoth reservation and hard ceilingYes
ignoreDo not pass the value to the providerNo
harbor run -p "<path/to/dataset>" -m "<model>" -a "<agent>" \
  -e docker --cpus limit --memory guarantee
environment:
  type: docker
  cpu_enforcement_policy: limit
  memory_enforcement_policy: auto

Use --override-cpus, --override-memory-mb, --override-storage-mb, --override-gpus, and --override-tpu (e.g. v6e=2x4) to replace task values at run time.

Provider support

Harbor validates policies at job start. Unsupported combinations fail before trials run. limit and guarantee require limit support; request and guarantee require request support.

Storage, GPUs, and TPUs

No enforcement policies. Harbor passes declared values to providers that support them:

ResourceProviders
StorageDaytona, Islo, Runloop, GKE, …
GPUsModal, GKE, Daytona
TPUsGKE

Validation

CheckWhen
Policy vs providerJob creation
Missing value for non-auto/ignore policyEnvironment start
GPU / TPU / internet requirementsEnvironment start
GPU and TPU both set (GKE)Environment start
GPU on docker-compose task (Daytona)Environment start

On this page