我正在尝试配置 jupyterlab dask 扩展,以便“新建”集群按钮将创建一个KubeCluster
而不是默认的LocalCluster
.
尝试编辑~/.config/dask/labextension.yml
使其具有以下内容:
kubernetes:
worker-template:
metadata:
spec:
restartPolicy: Never
containers:
- args:
- dask-worker
- --nthreads
- '2'
- --no-bokeh
- --memory-limit
- 12GB
- --death-timeout
- '60'
image: ${JUPYTER_IMAGE_SPEC}
name: dask-${JUPYTERHUB_USER}
resources:
limits:
cpu: "1.75"
memory: 12G
requests:
cpu: 1
memory: 12G
labextension:
factory:
module: dask_kubernetes
class: KubeCluster
args: []
kwargs: {}
(来源:https ://github.com/pangeo-data/pangeo-cloud-federation/blob/8f7f4bf9963ef1ed180dd20c952ff1aa8df54ca2/deployments/ocean/image/binder/dask_config.yaml#L37-L42 )
然而,使用笔记本按钮创建一个新集群仍然会创建一个LocalCluster
. 我错过了什么?