Install local packages on dask_gateway #133
Answered
by
TomAugspurger
José Gómez-Dans (jgomezdans)
asked this question in
Q&A
|
Hi, import os
def update_environment():
os.system("pip install -i /home/jovyan/my_pkg/")
from dask_gateway import GatewayCluster
cluster = GatewayCluster() # Creates the Dask Scheduler. Might take a minute.
client = cluster.get_client()
client.run(update_environment)This doesn't work (fails with message saying it can't find package import). Another option is from dask.distributed.diagnostics.plugin import PipInstall
plugin = PipInstall(packages=["file://home/jovyan/<blahblah>/"])
client.register_worker_plugin(plugin, name="<blahblah>")However, while this doesn't flag any errors, and the dashboard looks as if the dask graph has been built, it's just that all tasks are "waiting" forever. Any hints? |
Answered by
TomAugspurger
Nov 18, 2022
Replies: 1 comment 1 reply
|
You might have a couple options:
|
1 reply
Answer selected by
jgomezdans
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might have a couple options:
UploadFileto distribute the file to the workers: https://distributed.dask.org/en/stable/plugins.html?highlight=UploadFile#distributed.diagnostics.plugin.UploadFilePipInstallplugin from thereUploadFile) and thenpip installs it from the worker's local copy.