How can we limit 1GPU per user ? so that a single user will not consume all the available GPU

how can we limit 1GPU per user ? so that a single user will not consume all the available GPU.
I have GPU but those are exposed to all the users. and a single user can use them.

To help folks propose solutions, it is important to understand the deployment environment. Can you describe more the machine(s) you are using, Spawner, Authenticator, etc.? As well as the nature of your users (rough number, level of trust, accountability, etc.)?

1 Like

@Akash_sengar - thank you for opening this discussion and welcome to the community.

Although this would likely be too restrictive, Enterprise Gateway provides the ability to limit the number of kernels a given user can have. However, this limit cannot be applied on a per-kernel basis (although this could be implemented[*]). So, if you said users are allowed 1 active kernel, while this would address your GPU resource issue, it imposes that limit for other kernels as well.

EG also allows a given kernel to be used by specific users (or denied for a set of users depending on your user domain). But again, that wouldn’t prevent the same user from starting multiple GPU kernels (unless the max-kernels-per-user option was also imposed).

[*] Since we already store the canonical kernel name in our kernel session state, then we could support a kernelspec entry like: max-instances-per-user: N and control this at a kernel level.