#failed to pull image: failed to register layer: Container ID 1258672 cannot be mapped to a host ID
7 messages · Page 1 of 1 (latest)
Getting same error (different container id) but for pulling a custom image based on nvidia/cuda:12.8.0-devel-ubuntu22.04. Tried rebuilding the the image with USER root and creating a non-root user but both fixes failed and I got the same error. Any fixes? surprised that this hasn't been answered in 10 months
https://contact.runpod.io/hc/en-us/requests/new
please open a support ticket
DEVEL is the issue bro
Thanks Gary, do you have any links to more information/the cause?
use runtime instead also runpod pods run as root
thanks, I've also pasted in an extract from the response team in case this helps others:
What’s happening
The error:
failed to register layer: container ID XXXXX cannot be mapped to a host ID
is a known issue when using certain nvidia/cuda:*-devel images on platforms that run containers with user namespace remapping / rootless isolation, which Runpod does.
The devel images contain files and ownership metadata that exceed the UID/GID mapping range available on the host, so the image fails during layer registration before the container even starts.
That’s why:
The image builds fine elsewhere
The error happens immediately on pull
Other users have reported the same thing with -devel bases
This is not a CUDA 12.8 issue by itself, it is specifically the devel variant.
Recommended fix
Switch your base image from devel to runtime and explicitly install only the build tools you actually need.
For example:
FROM nvidia/cuda:12.8.0-runtime-ubuntu22.04
Then add back the required packages:
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
git \
curl \
wget \
sudo \
nginx \
&& rm -rf /var/lib/apt/lists/*
In most cases, this is sufficient and avoids the UID mapping issue entirely.