snowzach / doods

DOODS - Dedicated Open Object Detection Service
MIT License
303 stars 31 forks source link

Docker pull fails when user namespace mode enabled #33

Closed budbay closed 4 years ago

budbay commented 4 years ago

I am running docker on ubuntu with user namespace mode (userns) enabled and get the following error when pulling from snowzach/doods:latest or snowzach/doods:noavx

failed to register layer: Error processing tar file(exit status 1): Container ID 345018 cannot be mapped to a host ID

This appears to be an issue from one of the containers running a really high uid/gid. i have a pretty standard namespace setting of uid/gid range of 0 - 65535. When doing the initial pull this is the third from last container.

snowzach commented 4 years ago

I don't think that's related.. Doods runs as root.

budbay commented 4 years ago

Maybe i am not describing well enough, here is output when pulling the image.

Pulling doods (snowzach/doods:noavx)...
noavx: Pulling from snowzach/doods
5c939e3a4d10: Pull complete
c63719cdbe7a: Pull complete
19a861ea6baf: Pull complete
651c9d2d6c4f: Pull complete
49694e7db74f: Pull complete
8f0f277cba72: Pull complete
b131435f2102: Pull complete
d6979c076a3b: Pull complete
771f092a1fcd: Pull complete
940f60ea22d2: Pull complete
26570da321ef: Pull complete
536a02b251e8: Pull complete
b67d1b15c56e: Extracting [==================================================>]  49.55MB/49.55MB
c8f0ca674615: Download complete
52ea7c0daa40: Download complete
ERROR: failed to register layer: Error processing tar file(exit status 1): Container ID 345018 cannot be mapped to a host ID

so im not saying an issue with doods container itself but one of the components it is using, so depending on what is pulling i suppose this issue may be closed and opened elsewhere, i just am unsure of what yourre pulling from here.

snowzach commented 4 years ago

Okay, I see the issue. One of the model files it downloads has some insane UID number. I'll fix and rebuild... Sadly it's pretty much an all-day process..

budbay commented 4 years ago

oh man, sorry to hear that. Well thanks for checking into it, I appreciate all the work you put in. Whenever you're ready I will test and report back.

snowzach commented 4 years ago

Haha it's not a big deal to rebuild them. It just takes forever. The noavx image is done, give it a shot.

budbay commented 4 years ago

I am sorry to say that unfortunately the pull still fails in the same spot:

Pulling doods (snowzach/doods:noavx)...
noavx: Pulling from snowzach/doods
f08d8e2a3ba1: Already exists
3baa9cb2483b: Already exists
94e5ff4c0b15: Already exists
1860925334f9: Already exists
16bfc02b68bf: Pull complete
a77ad4768ee6: Pull complete
07ed9d1bfc5a: Pull complete
379628463562: Pull complete
33eca5acd51e: Pull complete
87788e320612: Pull complete
a76959872d48: Pull complete
d5217325aedd: Pull complete
fca814991f5b: Extracting [==================================================>]  49.55MB/49.55MB
b5e088f14a50: Download complete
f41790a31ffb: Download complete
3220b4377662: Download complete
ERROR: failed to register layer: Error processing tar file(exit status 1): Container ID 345018 cannot be mapped to a host ID
snowzach commented 4 years ago

Hmmm... Maybe try it one more time? Everything has finished pushing.

budbay commented 4 years ago

Sorry, same result. If you don't mind sharing what that high UID was that you found, I could temporarily set my range to that and verify were on the right track with this.

snowzach commented 4 years ago

Okay, I think I got it this time. Essentially when I download the models to include with the image, I extract it and it comes out with that crazy UID number of 345018. I added a change to chown it to root but that layer still has the bad UID before the chown. I changed it again to extract via tar and rewrite the UID to root. That should hopefully fix it.

budbay commented 4 years ago

Well that did it! I have Doods up and running now. Much appreciated.

snowzach commented 4 years ago

Good! Thanks for reporting.