Mastodon Feed: Post

Mastodon Feed

Boosted by glyph ("Glyph"):
itamarst@hachyderm.io ("Itamar Turner-Trauring") wrote:

On Python, `loky.cpu_count()` will take cgroups settings, common in Docker and Kubernetes, into account when calculating number of available cores.

Are there any other Python APIs that support cgroups options? Standard library doesn't.

(On Rust you can use `num_cpus` crate, on R there's parallely::availableCores()).

#python