opendatahub-io-contrib / jupyterhub-odh

Example JupyterHub deployment using OpenShift OAuth authenticator.
16 stars 31 forks source link

Add in cpu_modes in the spawn call #136

Closed Xaenalt closed 1 year ago

Xaenalt commented 2 years ago

This is needed for https://github.com/opendatahub-io/jupyterhub-singleuser-profiles/pull/222

This allows the spawner to use the new cpu_types field to add the soft anti-affinity for pods that don't request a GPU

Related Issues and Dependencies

https://github.com/opendatahub-io/jupyterhub-singleuser-profiles/pull/222

This introduces a breaking change

Will need to also apply https://github.com/opendatahub-io/jupyterhub-singleuser-profiles/pull/222 since the function signature changed

This Pull Request implements

This adds in the cpu_types parameter for apply_pod_profile call as per https://github.com/opendatahub-io/jupyterhub-singleuser-profiles/pull/222

Description

Overall change is to apply a soft anti-affinity for nodes tagged as GPU nodes when a notebook pod isn't requesting GPUs. The soft anti-affinity will allow users to prefer non-GPU nodes for non-GPU workloads unless there's a shortage of resources

LaVLaS commented 2 years ago

@Xaenalt This changes look good in https://github.com/opendatahub-io/jupyterhub-singleuser-profiles/pull/222. Do you have a custom JH image built with this PR and the JSP PR changes that I can test to verify functionality?

Xaenalt commented 2 years ago

I'll try to make a livebuild of all this

Xaenalt commented 2 years ago

Update: Live build was completed, but seems there's still a bug in this set of patches, investigating