At a glance
| Problem | The h2ogpte-models pod restarts in a loop right after startup. |
| Affects | Enterprise h2oGPTe 1.6.x, usually after an NVIDIA driver or GPU Operator upgrade. |
| Cause | nvidia-smi fails inside the models container, which sets off a fallback that the server's own startup check rejects. |
| Solution | Get 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
| Product | Enterprise h2oGPTe 1.6.x (confirmed on 1.6.54) |
| Component | h2ogpte-models deployment |
| Trigger | nvidia-smi fails inside the models container, often after a GPU driver or GPU Operator upgrade |
| Fixed in | 1.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
| Theory | Status |
|---|---|
| "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
- 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-smiDelete the
models-debugpod when you're done. - 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. - 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-smiinside the models image lists the expected GPUs.kubectl get pods -n <namespace> | grep modelsshows the pod Running, and the restart count stops going up.- The pod log no longer contains the assertion.