Skip to content

Kubernetes Multi-Node GPU Job Generator and Linter

Generate production-ready Kubeflow PyTorchJob, Volcano, and Indexed Job manifests. Prevent cluster deadlocks by linting shared memory, IPC_LOCK, and GPU QoS configurations.

Cluster and Job Parameters

Shared Memory (/dev/shm) Size64 GB
32
Total GPUs
2560 GB
Total VRAM
Guaranteed QoS
CPU / Memory
kubernetes-gpu-job.yaml
apiVersion: "kubeflow.org/v1"
kind: "PyTorchJob"
metadata:
  name: llama-training
  namespace: ai-training
  labels:
    app.kubernetes.io/name: llama-training
    app.kubernetes.io/component: gpu-job
spec:
  pytorchReplicaSpecs:
    Master:
      replicas: 1
      template:
    spec:
      hostIPC: true
      
      containers:
      - name: gpu-container
        image: pytorch/pytorch:2.4.0-cuda12.4-cudnn9-devel
        command:
        - "torchrun"
        - "--nproc_per_node=8"
        - "train.py"
        env:
        - name: PET_MASTER_PORT
          value: "29500"
        - name: PET_NUM_NODES
          value: "4"
        - name: NCCL_DEBUG
          value: "INFO"
        - name: NCCL_IB_DISABLE
          value: "0"
        resources:
          limits:
            nvidia.com/gpu: "8"
            memory: "256Gi"
            cpu: "32"
          requests:
            nvidia.com/gpu: "8"
            memory: "256Gi"
            cpu: "32"
        volumeMounts:
        - mountPath: /dev/shm
          name: dshm
        securityContext:
          capabilities:
            add:
            - IPC_LOCK
      volumes:
      - name: dshm
        emptyDir:
          medium: Memory
          sizeLimit: 64Gi
      tolerations:
      - key: nvidia.com/gpu
        operator: Exists
        effect: NoSchedule
    Worker:
      replicas: 3
      template:
    spec:
      hostIPC: true
      
      containers:
      - name: gpu-container
        image: pytorch/pytorch:2.4.0-cuda12.4-cudnn9-devel
        command:
        - "torchrun"
        - "--nproc_per_node=8"
        - "train.py"
        env:
        - name: PET_MASTER_PORT
          value: "29500"
        - name: PET_NUM_NODES
          value: "4"
        - name: NCCL_DEBUG
          value: "INFO"
        - name: NCCL_IB_DISABLE
          value: "0"
        resources:
          limits:
            nvidia.com/gpu: "8"
            memory: "256Gi"
            cpu: "32"
          requests:
            nvidia.com/gpu: "8"
            memory: "256Gi"
            cpu: "32"
        volumeMounts:
        - mountPath: /dev/shm
          name: dshm
        securityContext:
          capabilities:
            add:
            - IPC_LOCK
      volumes:
      - name: dshm
        emptyDir:
          medium: Memory
          sizeLimit: 64Gi
      tolerations:
      - key: nvidia.com/gpu
        operator: Exists
        effect: NoSchedule

Lint Findings & Recommendations0 Checks

Manifest passed all validation checks successfully. No deadlocks or scheduling risks detected.

Automate Distributed Training Reliability

Denpex automatically diagnoses NCCL timeout hangs, GPU memory fragmentation, and CUDA kernel crashes across PyTorch and DeepSpeed clusters. Start your 30 day free team evaluation today.

Start 30 Day Free Trial