1

I would like to do the equivalent of Client(LocalCluster()) from the command line.

When interacting with distributed from Jupyter notebooks, I end up restarting my kernel often and starting a new LocalCluster each time, as well as refreshing my bokeh webpage.

I would much rather have a process running in the background that I could just connect to, is this possible?

1 Answer 1

2

The relevant doc page here is http://distributed.readthedocs.io/en/latest/setup.html#using-the-command-line

In one terminal, write the following:

$ dask-scheduler

In another terminal, write the following:

$ dask-worker localhost:8786

The defaults are a bit different here. LocalCluster creates N single-threaded workers while dask-worker starts one N-threaded worker. You can change these defaults with the following keywords

$ dask-worker localhost:8786 --nthreads 1 --nprocs 4
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.