xgboost
xgboost copied to clipboard
xgboost 2.0.1 is breaking on rootless docker.
On rootless docker, path cgroup is readable only by root user.
As such, if any non-root users even tries to import xgboost, it fails with permission error.
Permission denied [/sys/fs/cgroup/cpu.max]
Can you please check and avoid this error is this path is not accessible? We are not able to use xgboost in the rootless docker container.
@prafullat Can you post the full stack trace for the permission error?
Will try to reproduce once I get back to work. At the moment my guess is this line to be blamed https://github.com/dmlc/xgboost/blob/5e64276a9b95df57e6dd8f9e63347636f4e5d331/src/common/threading_utils.cc#L78
I have tried to launch an image with and without gosu, running in rootless mode of docker, but couldn't reproduce the issue. @hcho3 might have better insight here.
$ docker info | grep "Root"
WARNING: No cpuset support
WARNING: No io.weight support
WARNING: No io.weight (per device) support
WARNING: No io.max (rbps) support
WARNING: No io.max (wbps) support
Docker Root Dir: /home/ubuntu/.local/share/docker
WARNING: No io.max (riops) support
WARNING: No io.max (wiops) support
Feel free to reopen if there is further information. Will try to fix it if there's a reproducer.
I am having the exact issue with a non-root user importing the package:
>>> import xgboost terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: status: Permission denied [/sys/fs/cgroup/cpu.max] Aborted (core dumped)
Could you please share how you installed docker (or any other environment)?
Thank you for the quick reply. Sorry I am a very beginner at this. I am a non-root user on a shared computing cluster and I am not the one setting up the environment. Could you perhaps give more specific instructions on the information I can provide?
Could you perhaps give more specific instructions on the information I can provide?
Unfortunately, I want these instructions as well. ;-( Maybe you can share the result of docker info
so that I can compare it with mine? @hcho3 might be able to provide more insights into the system setup.
I think I am not running on a docker so docker info
is not a valid command.
I will open a PR to catch all potential exceptions in that function.