Running GPU Workloads

Deploying workloads on the Anex virtual node

Networking

Vast.AI does not allow Wireguard in kernel space, so the VPN runs in user space via Wireproxy. RunPod blocks UDP entirely, so Wireguard is tunneled over WebSocket (wstunnel). In both cases, traffic from the remote container reaches the cluster either through an HTTP proxy or via TCP tunnels.

  • HTTP proxy is available inside the container at localhost:3128.
  • TCP tunnels are configured via env vars on the pod: GW_TUNNEL_<port> = <destination address>. Anex pushes those into the agent and wireproxy reroutes the local port to the destination over the VPN.

Machine Selection

Annotations on the pod control machine selection. Shared filters use the anex.sh/ prefix; provider-specific filters use vastai.anex.sh/ and runpod.anex.sh/.

Allowed Regions

AnnotationDescriptionAllowed values
anex.sh/regionComma-separated list of allowed regionseurope, north-america, asia-pacific, africa, south-america, oceania

GPU Identification

AnnotationDescriptionExample
anex.sh/gpu-namesComma-separated list of allowed GPU namesanex.sh/gpu-names: "RTX 4090,RTX 3090"
anex.sh/compute-capComma-separated list of allowed CUDA compute capabilitiesanex.sh/compute-cap: "8.6,8.9"

Numeric Filters

All numeric filters support three variants:

  • Exact value: <field>
  • Minimum: <field>-min
  • Maximum: <field>-max

If an exact value is set, the corresponding -min/-max are ignored.

AnnotationDescriptionUnit
anex.sh/gpu-countNumber of GPUscount
anex.sh/vramVRAM per GPUMB
anex.sh/vram-totalTotal VRAM across all GPUsMB
anex.sh/vram-bandwidthGPU memory bandwidthGB/s
anex.sh/tflopsTotal TFLOPSTFLOPS
anex.sh/cudaCUDA versionversion
anex.sh/cpuNumber of CPU corescores
anex.sh/ramSystem RAMMB
anex.sh/pricePrice per hour (whole machine)USD/hour
anex.sh/upload-speedUpload speedMbps
anex.sh/download-speedDownload speedMbps
anex.sh/disk-space-gbContainer disk to allocateGB
anex.sh/disk-bwDisk bandwidthMB/s

Vast.AI-Specific

AnnotationDescriptionType
vastai.anex.sh/verified-onlyOnly select Vast.AI-verified machines (default true)bool
vastai.anex.sh/datacenter-onlyOnly select datacenter machines (no consumer hardware)bool
vastai.anex.sh/dlperfDLPerf benchmark score (also -min / -max)float

RunPod-Specific

AnnotationDescriptionValues
runpod.anex.sh/cloud-typeRunPod cloud tierSECURE or COMMUNITY
runpod.anex.sh/datacenter-idsComma-separated, priority-ordered datacenter IDse.g. EU-RO-1,US-CA-2
runpod.anex.sh/keep-gpu-type-priorityPreserve GPU type priority order during selectionbool

Example Pod

apiVersion: v1
kind: Pod
metadata:
  name: my-gpu-workload
  annotations:
    # Region + GPU
    anex.sh/region: "europe"
    anex.sh/gpu-names: "RTX 4090,RTX 3090"
    anex.sh/gpu-count: "2"
    anex.sh/vram-min: "20480"     # ≥ 20GB per GPU

    # CPU and RAM
    anex.sh/cpu-min: "8"
    anex.sh/ram-min: "32768"      # ≥ 32GB RAM

    # Price
    anex.sh/price-max: "1.50"

    # Network
    anex.sh/download-speed-min: "1000"

    # Vast.AI: only verified datacenter hardware
    vastai.anex.sh/verified-only: "true"
    vastai.anex.sh/datacenter-only: "true"
spec:
  containers:
    - name: training
      image: pytorch/pytorch:latest
      command: ["python", "train.py"]
  nodeSelector:
    node-provider: vastai
  tolerations:
    - key: "virtual-kubelet.io/provider"
      operator: "Equal"
      value: "vastai"
      effect: "NoSchedule"
    - key: "ignore-taint.cluster-autoscaler.kubernetes.io/manual-ignore"
      operator: "Equal"
      value: "true"
      effect: "NoSchedule"

Filter Behaviour

  • Exact vs range — when an exact value is set, the matching -min/-max filters are ignored.
  • AND across filters — every annotation that is set must be satisfied.
  • OR within a listgpu-names, compute-cap, region, etc. accept any value from the list.
  • Default ordering — candidates are sorted by price ascending.
  • Bans (Vast.AI) — machines that fail provisioning are banned for the configured timeout and skipped on subsequent retries. RunPod does not implement bans.
Last modified May 5, 2026: update docs for 1.0.0 (2b78ac9)