Skip to content
Open
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
34 changes: 19 additions & 15 deletions providers/kubernetes/daskhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,27 @@ dask-gateway:
c.ClusterConfig.cluster_max_workers = 4
c.ClusterConfig.idle_timeout = 1800
optionHandler: |
from dask_gateway_server.options import Options, Integer, Float, String
from dask_gateway_server.options import Options, Integer, Float, String, Mapping

def options_handler(options):
if ":" not in options.image:
raise ValueError("When specifying an image you must also provide a tag")
return {
"worker_cores": options.worker_cores,
"worker_memory": int(options.worker_memory * 2 ** 30),
"image": options.image,
}
def cluster_options(user):
def option_handler(options):
if ":" not in options.image:
raise ValueError("When specifying an image you must also provide a tag")

c.Backend.cluster_options = Options(
Integer("worker_cores", default=1, min=1, max=8, label="Worker Cores"),
Float("worker_memory", default=2, min=2, max=32, label="Worker Memory (GiB)"),
String("image", default="quay.io/pangeo/pangeo-notebook:2025.06.02", label="Image"),
handler=options_handler,
)
return {
"worker_cores": options.worker_cores,
"worker_memory": int(options.worker_memory * 2 ** 30),
"image": options.image,
"environment_vars": options.environment_vars,
}
return Options(
Integer("worker_cores", default=1, min=1, max=1, label="Worker Cores"),
Float("worker_memory", default=2, min=2, max=7, label="Worker Memory (GiB)"),
String("image", default="quay.io/pangeo/pangeo-notebook:2025.06.02", label="Image"),
Mapping("environment_vars", {}, label="Environment Variables"),
handler=options_handler,
)
c.Backend.cluster_options = cluster_options
prefix: /services/dask-gateway
backend:
scheduler:
Expand Down