Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose --jupyter on the scheduler #802

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Aug 14, 2023

If you set --jupyter on the dask scheduler command it will start Jupyter on the same web server as the dashboard. This PR exposes that option easily via KubeCluster and the dask kubernetes gen CLI.

from dask_kubernetes.operator import KubeCluster

# NOTE: The image must have Jupyter installed
cluster = KubeCluster(name="dask-jupyter", image="ghcr.io/dask/dask-notebook:latest", jupyter=True)

# You can quickly get the Jupyter link with
print(cluster.jupyter_link)

This is also with with dask kubernetes gen cluster.

$ dask kubernetes gen cluster --name dask-jupyter --image ghcr.io/dask/dask-notebook:latest --jupyter

And the link is listed in the dask kubernetes port-forward output.

$ dask kubernetes port-forward dask-jupyter
Scheduler at: tcp://localhost:50457
Dashboard at: http://localhost:62546/status
Jupyter at: http://localhost:62546/jupyter/lab
Press ctrl+c to exit

@jacobtomlinson jacobtomlinson merged commit 3bdccfa into dask:main Aug 14, 2023
18 checks passed
@jacobtomlinson jacobtomlinson deleted the jupyter branch August 14, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant