Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license CC4-BY
posted in category Systems Software / Docker
posted at 06. Jan '23

Howto Fix open /var/lib/docker/tmp/docker-import-3927653466/sources/json: no such file or directory

So I was trying to import nvidia cuda docker image downloaded manually from nVidia site (https://developer.download.nvidia.com/compute/cuda/opensource/image/12.0.0/) as docker required login. But I got a strange error:

damon@rapthalia:~/Downloads> docker load -i nvidia-cuda-12.0.0-base-rockylinux8-x86_64-sha256-e71360085c6175fe8a656e0150cf3559aac05445257f3b761b50ed4c3401669e.tar 
open /var/lib/docker/tmp/docker-import-3927653466/sources/json: no such file or directory
damon@rapthalia:~/Downloads> cat nvidia-cuda-12.0.0-base-rockylinux8-x86_64-sha256-e71360085c6175fe8a656e0150cf3559aac05445257f3b761b50ed4c3401669e.tar | docker load
open /var/lib/docker/tmp/docker-import-346051151/sources/json: no such file or directory

The correct command is to use docker import, not docker load:

damon@rapthalia:~/Downloads> docker import nvidia-cuda-12.0.0-base-rockylinux8-x86_64-sha256-e71360085c6175fe8a656e0150cf3559aac05445257f3b761b50ed4c3401669e.tar 

damon@rapthalia:~/Downloads> docker run --rm --gpus all cb42d10ba62defbf0cbd62b79509cca30cd148b46df29a2de84cd47bbf23e75c nvidia-smi
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

In short: docker save -> docker load (layered image), docker export -> docker import.

Sometimes I read how developers search all day and they do not code. But solving cryptic errors like theseā€¦there is no other way. Or read the manual which is too long with uncertain result. I would wish for nice error messages though.


Add Comment