Skip to content

Conversation

@reboss
Copy link
Owner

@reboss reboss commented Oct 27, 2025

I add a "connection context" to the http server initialization. With this context, whenever a connection is made, it reads the SO_PEERCRED of the user that wrote to the docker.sock file to get the user's PID (PID of the docker cli command). Then it reads /proc/$PID/cgroup to get their cgroup and parses it. It then adds the HostConfig option, CgroupParent, which is what the command line arg --cgroup-parent= would translate to. This forces the container to have the Slurm provided cgroup and ensures that a user can only see the GPUs that they requested, and thus cannot interfere with others work by accident.

@reboss reboss force-pushed the user-cgroup-adoption branch from 4fa55ef to bb15eea Compare October 27, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants