betatim
September 16, 2020, 6:12pm
3
This is based on a question ask in the chat by Brooks Ambrose (no forum account?):
Is there a way for a program running inside a BinderHub pod to detect directly what limits are imposed on it? I basically want to write the program to automatically adapt its core usage depending on whether it’s being run under resource limits or not.
For those only here for the answer: For the specific case of mybinder.org checking the value of the CPU_LIMIT environment variable will tell you how many cores y…
is a thread from a while back that has some discussion and code snippets for finding out what CPU (and RAM) limits are in force when you are running on mybinder.org .