Corrupt docker buildkit?

on the DGX Spark, has anyone else had an out of the box docker issue?

“error initializing buildkit: error creating buildkit instance: invalid database”

To fix I had to backup /var/lib/docker/buildkit, temporarily disable buildkit

reload docker

re-enable buildkit.

It’s working now. But I’ve never had anything like that ever happen before in Ubuntu.

1 Like

Yes, had the same issue here, for both devices. But my distro of choice is Fedora, so I don’t know if this is a common Ubuntu problem.

1 Like

Same here. I’m using an Asus GX10.

1 Like

I’m using an Asus as well.

Also had the same issue with the Asus model. Can you share the commands you ran to resolve?

Same problem here. Here are some commands that fixed it for me.

sudo systemctl stop docker.service

sudo -s

mv /var/lib/docker/buildkit /var/lib/docker/buildkit-bad

exit

sudo systemctl start docker.service

If that worked you should be able to do:

docker ps

Hope that helps, it took me a couple minutes to figure that one out…

1 Like

@PoshPorcupine thanks for the reply! Are you also on an Asus? Or a different manufacturer?

Hi robs1978, when are you seeing this error? running docker commands?

This happened when running docker commands on my ASUS version of the Spark. I suspect it is specific to ASUS. It happened on both of my ASUS machines, out of the box. Once it was cleaned up it works fine. I will soon do a fresh install from their recovery iso, and will see if the bad file is put down from that.

I also have the ASUS. I had this issue on a brand new machine that was just updated and I had nothing else on it yet.

I also have an Asus Ascent GX10 brand new, just booted up last night for the first time. Same error:

Nov 07 11:27:40 spark.home.local dockerd[6832]: time=“2025-11-07T11:27:40.166141030-08:00” level=info msg=“Initializing buildkit”
Nov 07 11:27:40 spark.home.local dockerd[6832]: error initializing buildkit: error creating buildkit instance: invalid database

The sequence that fixed it, run as root:

systemctl stop docker
systemctl disable docker
mv /var/lib/docker/buildkit /root/buildkit-bad
systemctl enable docker
systemctl start docker

Now Docker is fine. Seems like they fumbled the Docker configuration in the installer.

EDIT: I still see a warning in the logs, not sure how important it is:

msg="Error (Unable to complete atomic operation, key modified) deleting object

Has anybody managed to run a container with GPU support? I tried this:

docker run -d --restart no \
--gpus=all \
-p 11434:11434 \
--add-host=host.docker.internal:host-gateway \
-v ollama:/root/.ollama \
--name ollama \
ollama/ollama:latest

But I get this error:

time=2025-11-07T20:43:04.384Z level=INFO source=runner.go:67 msg=“discovering available GPUs…”
time=2025-11-07T20:43:04.384Z level=INFO source=server.go:400 msg=“starting runner” cmd=“/usr/bin/ollama runner --ollama-engine --port 34271”
time=2025-11-07T20:43:34.413Z level=INFO source=runner.go:442 msg=“failure during GPU discovery” OLLAMA_LIBRARY_PATH=“[/usr/lib/ollama /usr/lib/ollama/cuda_jetpack5]” extra_envs=map error=“failed to finish discovery before timeout”

I’ve even ripped out all Docker-related packages and installed a brand new Docker Engine from here Ubuntu | Docker Docs and I get the same result.

nvidia-container-toolkit is installed.

EDIT: Nevermind, this might be an Ollama issue. I’ve added --runtime=nvidia to the container options, and it seems to run just fine. This command also works well:

docker run -it --runtime=nvidia --gpus=all nvcr.io/nvidia/cuda:13.0.1-devel-ubuntu24.04 nvidia-smi

journalctl  | grep “dockerd”

...
Nov 07 21:46:26 gx10-9c8c dockerd[3214]: time="2025-11-07T21:46:26.368012720-05:00" level=warning msg="Error (Unable to complete atomic operation, key modified) deleting object [endpoint_count 7ffe9246a025289a4a5af07683157ee5ca8722e9070bf5bb8d180058a169b2df], retrying...."
Nov 07 21:46:26 gx10-9c8c dockerd[3214]: time="2025-11-07T21:46:26.388339424-05:00" level=info msg="Loading containers: done."
Nov 07 21:46:26 gx10-9c8c dockerd[3214]: time="2025-11-07T21:46:26.415774368-05:00" level=info msg="Docker daemon" commit=bea959c containerd-snapshotter=false storage-driver=overlay2 version=28.3.3
Nov 07 21:46:26 gx10-9c8c dockerd[3214]: time="2025-11-07T21:46:26.415807936-05:00" level=info msg="Initializing buildkit"
Nov 07 21:46:26 gx10-9c8c dockerd[3214]: error initializing buildkit: error creating buildkit instance: invalid database