Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ make down

See `values.yaml` for all configuration options. The chart wraps the [JupyterHub Helm chart](https://z2jh.jupyter.org/) - all `jupyterhub.*` values are passed through.

- [GPU profiles](docs/gpu-profiles.md) - requesting GPUs and scheduling onto tainted GPU nodes on EKS.

## Shared Storage

Per-group shared directories (`/shared/<group>` in every user pod) need a
Expand Down
48 changes: 48 additions & 0 deletions docs/gpu-profiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# GPU Profiles

A profile requests a GPU by setting `extra_resource_limits` in its
`kubespawner_override`:

```yaml
jupyterhub:
custom:
profiles:
- slug: gpu-instance
display_name: "GPU Instance"
kubespawner_override:
extra_resource_limits:
nvidia.com/gpu: 1
```

## Scheduling onto tainted GPU nodes (EKS)

On EKS, NIC taints GPU node groups with `nvidia.com/gpu=true:NoSchedule` so
ordinary pods stay off GPU nodes. EKS cannot run the `ExtendedResourceToleration`
admission controller (it is not available on the managed control plane), so
nothing injects the matching toleration for you. Without it, a GPU server stays
`Pending` and never schedules onto the GPU node.

Add the toleration to the GPU profile's `kubespawner_override`. `kubespawner_override`
accepts any KubeSpawner trait, and `tolerations` is one of them, so no chart code
change is needed:

```yaml
jupyterhub:
custom:
profiles:
- slug: gpu-instance
display_name: "GPU Instance"
kubespawner_override:
extra_resource_limits:
nvidia.com/gpu: 1
tolerations:
- key: "nvidia.com/gpu"
operator: "Exists"
effect: "NoSchedule"
```

`operator: Exists` matches the taint regardless of its value, so it works with
NIC's `value: "true"` and any other value. Non-GPU profiles need no toleration.

> Auto-injecting this toleration for any GPU profile is tracked in
> [issue #117](https://github.com/nebari-dev/nebari-data-science-pack/issues/117).
Loading