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"| Field | Description |
|---|---|
cpus | CPU count |
memory_mb | RAM in MB |
storage_mb | Ephemeral disk in MB |
gpus | GPU count |
gpu_types | Acceptable GPU types (optional) |
tpu.type | TPU accelerator type — alias (v6e, trillium, v4) or GKE label (tpu-v6e-slice) |
tpu.topology | TPU 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.
| Policy | Meaning | Requires cpus / memory_mb? |
|---|---|---|
auto | Use the provider's default mode | No |
limit | Hard ceiling only | Yes |
request | Reservation only, no ceiling | Yes |
guarantee | Both reservation and hard ceiling | Yes |
ignore | Do not pass the value to the provider | No |
harbor run -p "<path/to/dataset>" -m "<model>" -a "<agent>" \
-e docker --cpus limit --memory guaranteeenvironment:
type: docker
cpu_enforcement_policy: limit
memory_enforcement_policy: autoUse --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:
| Resource | Providers |
|---|---|
| Storage | Daytona, Islo, Runloop, GKE, … |
| GPUs | Modal, GKE, Daytona |
| TPUs | GKE |
Validation
| Check | When |
|---|---|
| Policy vs provider | Job creation |
Missing value for non-auto/ignore policy | Environment start |
| GPU / TPU / internet requirements | Environment start |
| GPU and TPU both set (GKE) | Environment start |
| GPU on docker-compose task (Daytona) | Environment start |