At a glance

ProblemThe h2ogpte-models pod restarts in a loop right after startup.
AffectsEnterprise h2oGPTe 1.6.x, usually after an NVIDIA driver or GPU Operator upgrade.
Causenvidia-smi fails inside the models container, which sets off a fallback that the server's own startup check rejects.
SolutionGet nvidia-smi working inside the container, and upgrade to 1.7.3 or later.

Symptom

The h2ogpte-models pod goes into CrashLoopBackOff, often right after an NVIDIA driver or GPU Operator upgrade. The pod log ends with:

AssertionError: server: don't import torch before forking processes
Application startup failed. Exiting.

The log may also show the pod running in CPU mode, with no visible CUDA devices. The pod crashes during startup, before it serves any requests.

Applies to

ProductEnterprise h2oGPTe 1.6.x (confirmed on 1.6.54)
Componenth2ogpte-models deployment
Triggernvidia-smi fails inside the models container, often after a GPU driver or GPU Operator upgrade
Fixed in1.7.3 removes the fallback that crashes. You still need to fix the nvidia-smi failure itself.

Cause

At startup, the models server checks for GPUs with nvidia-smi. If nvidia-smi fails inside the container, the server falls back to finding GPUs through PyTorch. That imports torch in the parent process before the server forks its workers, and a built-in safety check stops startup.

The assertion is a side effect. The real problem is that nvidia-smi fails inside the container.

What this is not

TheoryStatus
"nvidia-smi works on the node, so the GPUs are fine"Not enough. nvidia-smi can work on the node or in the NVIDIA driver daemonset pod and still fail inside the h2oGPTe image. You need to test it inside that image.

Resolution

  1. Run nvidia-smi inside the models image.The pod restarts too quickly to exec into, so start a debug copy that runs a shell in place of the server:
    kubectl debug -n <namespace> <h2ogpte-models-pod> -it --copy-to=models-debug --container=<models-container> -- sh
    nvidia-smi

    Delete the models-debug pod when you're done.

  2. If nvidia-smi fails in the container (for example Failed to initialize NVML: Driver/library version mismatch), fix the GPU stack on that node. Check that the GPU Operator driver and toolkit pods on the node are Running and have finished the upgrade. Common causes are an upgrade that didn't finish, or a node that is still running the old driver.
  3. Upgrade to Enterprise h2oGPTe 1.7.3 or later. This removes the crash path. GPU features still need nvidia-smi to work in the container.

How to verify

  • nvidia-smi inside the models image lists the expected GPUs.
  • kubectl get pods -n <namespace> | grep models shows the pod Running, and the restart count stops going up.
  • The pod log no longer contains the assertion.