dask / dask/distributed

Specify Dask cluster to use conda environment upon connecting to it via Client

Open
#3,369 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

Hello,

We have a set up where we have a node (AWS SageMaker Notebook instance) that we use to coordinate various ML tasks. One task consists of using Dask for some at-scale data preprocessing. For this task, in a Jupyter notebook cell we would do...

`
client = Client(scheduler-ip)
`

The scheduler-ip is pointing to an already-created cluster (for example ECS). The cluster consists of nodes running Dask-scheduler and Dask-worker processes.

Now, the user using the Notebook knows the set of libraries that they want Dask cluster to understand / use. So the user would use conda-pack to package up those libraries; e.g. create `my_env.tar.gz` file.

What the user would like to then do is tell the Dask cluster to use that packaged-up environment.

Something like..

`
client.use_environment('my_env.tar.gz')
`

Is this possible to achieve?

I saw client.run / client.upload_file APIs. So I thought one potential would be to upload the tar.gz file then call "run" for Dask workers to use the environment or something. But that doesn't seem like a good solution in case of worker restarts / new workers.

Any pointers would be great.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.