I have a basic issue I cannot run docker containers with nvidia
runtime unless I plug a monitor into the display port. It throws failed to stat CDI host device "/dev/fb0": no such file or directory: unknown
as error.
When I start a docker container when the monitor is plugged in, all looks good
$ docker run --privileged --network host --ipc=host -e DISPLAY -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all -ti --rm --runtime nvidia nvidia/cuda:12.6.0-base-ubuntu22.04 nvidia-smi
Mon Feb 17 15:56:02 2025
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 540.4.0 Driver Version: 540.4.0 CUDA Version: 12.6 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Orin (nvgpu) N/A | N/A N/A | N/A |
| N/A N/A N/A N/A / N/A | Not Supported | N/A N/A |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
However, when no monitor connected to my jetson device, all containers fail (so I cannot run Isaac Ros, etc.)
$ docker run --privileged --network host --ipc=host -e DISPLAY -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all -ti --rm --runtime nvidia nvidia/cuda:12.6.0-base-ubuntu22.04
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: could not apply required modification to OCI specification: error modifying OCI spec: failed to inject CDI devices: failed to inject devices: failed to stat CDI host device "/dev/fb0": no such file or directory: unknown.
I am sure I am the dumb here, but how can I configure the device that it will run nvidia containers regardless if a monitor is plugged in or not?