Open iameskild opened 1 year ago
(2) sound difficult since you cannot have a scratch persistent volume that is shared (requires nfs and will be slow). Basically I don't think this approach will work at all.
(3) absolutely a zero development required approach
(1) to me sounds like the most correct option. Also opens up the ability to have certain users use this feature with others using the shared storage.
I'm in favor of (1) and I don't think it is too much development. I do think that it does make backups more difficult.
As a quick way to add persistent, per user PVCs, you can add the following the kubespawner_override
section of a profile:
profiles:
jupyterlab:
- display_name: Small Instance
description: Stable environment with 2 cpu / 8 GB ram
kubespawner_override:
...
storage_pvc_ensure: true
storage_class: premium-rwo-immediate # custom storageClass with `volumeBindingMode: Immediate`
storage_capacity: 200Gi
extra_pod_config:
volumes:
- name: persistent-scratch
persistent_volume_claim:
claim-name: "{username}-scratch-pvc"
extra_container_config:
volumeMounts:
- name: persistent-scratch
mountPath: "/scratch"
This is a good candidate for a FAQ.
There is often a need for a fast, persistent scratch space when working with and compiling large projects (such as Pytorch). At the moment, users can add an ephemeral scratch space per user by modifying one of the profiles in the
profile
section of thenebari-config.yaml
(this might also require adding a fast custom storage space using thehelm_extension
):Example of modified `profile`
```yaml - display_name: Medium Instance description: Stable environment with 4 cpu / 16 GB ram kubespawner_override: cpu_limit: 4 cpu_guarantee: 3 mem_limit: 16G mem_guarantee: 10G extra_pod_config: volumes: - name: scratch-volume ephemeral: volumeClaimTemplate: spec: accessModes: [ "ReadWriteOnce" ] # defined in local helm chart: custom-premium-sc storageClassName: "premium-rwo-immediate" resources: requests: storage: 200Gi extra_container_config: - name: "scratch-volume" mountPath: "/scratch" ```I am opening this issue to explore other possible options.
Implement the solution that is being discussed in nebari-dev/nebari#1549
nebari-config.yaml
.Create a special user group (with an associated server profile) that includes an scratch persistent volume.
Set up a new server profile per user and attach whichever additional storage each of those users might need.
nebari-config.yaml
(similar to the example of the attached ephemeral storage above).