From 8177a2b7700273f904acf690cebd90bacc830292 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 22 Mar 2024 19:25:51 -0700 Subject: [PATCH 1/2] Replicate the NASA GHG profile list config for smithsonian Based on request in https://2i2c.freshdesk.com/a/tickets/1359 --- .../clusters/smithsonian/common.values.yaml | 185 ++++++++++-------- 1 file changed, 101 insertions(+), 84 deletions(-) diff --git a/config/clusters/smithsonian/common.values.yaml b/config/clusters/smithsonian/common.values.yaml index 07f200e906..4b0b8082fe 100644 --- a/config/clusters/smithsonian/common.values.yaml +++ b/config/clusters/smithsonian/common.values.yaml @@ -36,6 +36,7 @@ basehub: url: https://www.si.edu/ hub: + allowNamedServers: true config: JupyterHub: authenticator_class: github @@ -60,99 +61,92 @@ basehub: singleuser: profileList: - # NOTE: About node sharing - # - # CPU/Memory requests/limits are actively considered still. This - # profile list is setup to involve node sharing as considered in - # https://github.com/2i2c-org/infrastructure/issues/2121. - # - # - Memory requests are different from the description, based on: - # what's found to remain allocate in k8s, subtracting 1GiB - # overhead for misc system pods, and transitioning from GB in - # description to GiB in mem_guarantee. - # - CPU requests are lower than the description, with a factor of - # 10%. - # - - display_name: "Small: up to 4 CPU / 32 GB RAM" - description: &profile_list_description "Start a container with at least a chosen share of capacity on a node of this type" - slug: small + - display_name: "Pangeo Notebook" + slug: modified-pangeo + description: Pangeo based notebook with a Python environment default: true - profile_options: - image: &profile_options_image - display_name: Image + kubespawner_override: + image: quay.io/pangeo/pangeo-notebook:2024.03.22 + profile_options: &profile_options + resource_allocation: &profile_options_resource_allocation + display_name: Resource Allocation choices: - geospatial: - display_name: Rocker Geospatial - default: true - slug: geospatial + mem_1_9: + display_name: 1.9 GB RAM, upto 3.7 CPUs kubespawner_override: - image: rocker/binder:4.3 - image_pull_policy: Always - working_dir: /home/rstudio - default_url: /rstudio - scipy: - display_name: Jupyter SciPy Notebook - slug: scipy - kubespawner_override: - # FIXME: use quay.io/ for tags after 2023-10-20 - image: "jupyter/scipy-notebook:2023-09-04" - pangeo: - display_name: Pangeo Notebook - slug: pangeo - kubespawner_override: - image: "quay.io/pangeo/pangeo-notebook:2023.08.29" - tensorflow: &image_tensorflow - display_name: Pangeo Tensorflow ML Notebook - slug: tensorflow - kubespawner_override: - image: "pangeo/ml-notebook:2023.08.29" - pytorch: &image_pytorch - display_name: Pangeo PyTorch ML Notebook - slug: pytorch - kubespawner_override: - image: "pangeo/pytorch-notebook:2023.08.29" - requests: - # NOTE: Node share choices are in active development, see comment - # next to profileList: above. - display_name: Node share - choices: - mem_1: + mem_guarantee: 1991341312 + mem_limit: 1991341312 + cpu_guarantee: 0.234375 + cpu_limit: 3.75 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge default: true - display_name: ~1 GB, ~0.125 CPU + mem_3_7: + display_name: 3.7 GB RAM, upto 3.7 CPUs kubespawner_override: - mem_guarantee: 0.904G - cpu_guarantee: 0.013 - mem_2: - display_name: ~2 GB, ~0.25 CPU + mem_guarantee: 3982682624 + mem_limit: 3982682624 + cpu_guarantee: 0.46875 + cpu_limit: 3.75 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_7_4: + display_name: 7.4 GB RAM, upto 3.7 CPUs kubespawner_override: - mem_guarantee: 1.809G - cpu_guarantee: 0.025 - mem_4: - display_name: ~4 GB, ~0.5 CPU + mem_guarantee: 7965365248 + mem_limit: 7965365248 + cpu_guarantee: 0.9375 + cpu_limit: 3.75 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_14_8: + display_name: 14.8 GB RAM, upto 3.7 CPUs kubespawner_override: - mem_guarantee: 3.617G - cpu_guarantee: 0.05 - mem_8: - display_name: ~8 GB, ~1.0 CPU + mem_guarantee: 15930730496 + mem_limit: 15930730496 + cpu_guarantee: 1.875 + cpu_limit: 3.75 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_29_7: + display_name: 29.7 GB RAM, upto 3.7 CPUs kubespawner_override: - mem_guarantee: 7.234G - cpu_guarantee: 0.1 - mem_16: - display_name: ~16 GB, ~2.0 CPU + mem_guarantee: 31861460992 + mem_limit: 31861460992 + cpu_guarantee: 3.75 + cpu_limit: 3.75 + node_selector: + node.kubernetes.io/instance-type: r5.xlarge + mem_60_6: + display_name: 60.6 GB RAM, upto 15.7 CPUs kubespawner_override: - mem_guarantee: 14.469G - cpu_guarantee: 0.2 - mem_32: - display_name: ~32 GB, ~4.0 CPU + mem_guarantee: 65094813696 + mem_limit: 65094813696 + cpu_guarantee: 7.86 + cpu_limit: 15.72 + node_selector: + node.kubernetes.io/instance-type: r5.4xlarge + mem_121_2: + display_name: 121.2 GB RAM, upto 15.7 CPUs kubespawner_override: - mem_guarantee: 28.937G - cpu_guarantee: 0.4 + mem_guarantee: 130189627392 + mem_limit: 130189627392 + cpu_guarantee: 15.72 + cpu_limit: 15.72 + node_selector: + node.kubernetes.io/instance-type: r5.4xlarge + - display_name: "Rocker Geospatial with RStudio" + slug: rocker + description: R environment with many geospatial libraries pre-installed kubespawner_override: - cpu_limit: null - mem_limit: null - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - + image: rocker/binder:4.3 + image_pull_policy: Always + # Launch RStudio after the user logs in + default_url: /rstudio + # Ensures container working dir is homedir + # https://github.com/2i2c-org/infrastructure/issues/2559 + working_dir: /home/rstudio + profile_options: *profile_options - display_name: NVIDIA Tesla T4, ~16 GB, ~4 CPUs slug: gpu description: "Start a container on a dedicated node with a GPU" @@ -163,8 +157,16 @@ basehub: image: display_name: Image choices: - tensorflow: *image_tensorflow - pytorch: *image_pytorch + tensorflow: + display_name: Pangeo Tensorflow ML Notebook + slug: tensorflow + kubespawner_override: + image: "pangeo/ml-notebook:2024.03.22" + pytorch: + display_name: Pangeo PyTorch ML Notebook + slug: pytorch + kubespawner_override: + image: "pangeo/pytorch-notebook:2024.03.22" kubespawner_override: mem_limit: null environment: @@ -174,3 +176,18 @@ basehub: node.kubernetes.io/instance-type: g4dn.xlarge extra_resource_limits: nvidia.com/gpu: "1" + - display_name: "Bring your own image" + description: Specify your own docker image (must have python and jupyterhub installed in it) + slug: custom + profile_options: + image: + display_name: Image + unlisted_choice: + enabled: True + display_name: "Custom image" + validation_regex: "^.+:.+$" + validation_message: "Must be a publicly available docker image, of form :" + kubespawner_override: + image: "{value}" + choices: {} + resource_allocation: *profile_options_resource_allocation From f00c123ff1da527a8d3ef46e7d40b19299c53884 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Mon, 25 Mar 2024 11:20:03 -0700 Subject: [PATCH 2/2] Use `pangeo` directly for slug --- config/clusters/smithsonian/common.values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/clusters/smithsonian/common.values.yaml b/config/clusters/smithsonian/common.values.yaml index 4b0b8082fe..d76e8dd7ec 100644 --- a/config/clusters/smithsonian/common.values.yaml +++ b/config/clusters/smithsonian/common.values.yaml @@ -62,7 +62,7 @@ basehub: singleuser: profileList: - display_name: "Pangeo Notebook" - slug: modified-pangeo + slug: pangeo description: Pangeo based notebook with a Python environment default: true kubespawner_override: