Matej
05/11/2021, 5:17 PM[2021-05-11 19:11:14+0200] ERROR - prefect.FlowRunner | Unexpected error: ModuleNotFoundError("No module named 'prefect'")
it seems that the worker does not have the prefect installed.
Dask is running in a kubernetes cluster so is there a smart way on how to install prefect module on all the dask workers?
MKevin Kho
Kevin Kho
Matej
05/11/2021, 5:28 PMexecutor = DaskExecutor(address="<tcp://dask-scheduler-hostname:8786>")
flow.run(executor=executor)
dask-scheduler-hostname is where the dask scheduler runs in a kubernetes clusterKevin Kho
Matej
05/11/2021, 5:33 PMKevin Kho
Kevin Kho
EXTRA_PIP_PACKAGES
and the Dask cluster will install them: https://github.com/dask/dask-docker#environment-variablesKevin Kho
Kevin Kho
Matej
05/12/2021, 5:01 PM- name: EXTRA_CONDA_PACKAGES
value: prefect -c conda-forge
and I still get the same error ModuleNotFound prefect
[2021-05-12 18:57:11+0200] INFO - prefect.DaskExecutor | Stopping executor, waiting for 1 active tasks to complete
[2021-05-12 18:57:11+0200] ERROR - prefect.FlowRunner | Unexpected error: ModuleNotFoundError("No module named 'prefect'")
Traceback (most recent call last):
File "/home/m/repo/prefect/src/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/home/m/repo/prefect/src/prefect/engine/flow_runner.py", line 643, in get_flow_run_state
final_states = executor.wait(
File "/home/m/repo/prefect/src/prefect/executors/dask.py", line 414, in wait
return self.client.gather(futures)
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/distributed/client.py", line 1975, in gather
return self.sync(
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/distributed/client.py", line 843, in sync
return sync(
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/distributed/utils.py", line 353, in sync
raise exc.with_traceback(tb)
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/distributed/utils.py", line 336, in f
result[0] = yield future
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/m/miniconda3/envs/prefect/lib/python3.8/site-packages/distributed/client.py", line 1840, in _gather
raise exception.with_traceback(traceback)
File "/opt/conda/lib/python3.8/site-packages/distributed/protocol/pickle.py", line 75, in loads
ModuleNotFoundError: No module named 'prefect'
[2021-05-12 18:57:11+0200] ERROR - <http://prefect.My|prefect.My> First Flow | Unexpected error occured in FlowRunner: ModuleNotFoundError("No module named 'prefect'")
What am i doing wrong? It is a simple hello world example.Kevin Kho
Matej
05/12/2021, 5:05 PMKevin Kho
upgrade
like helm upgrade bald-eel dask/dask -f config.yaml
Kevin Kho
Matej
05/12/2021, 5:08 PMMatej
05/12/2021, 5:08 PMMatej
05/12/2021, 5:08 PMMatej
05/12/2021, 5:08 PMMatej
05/12/2021, 5:10 PMMatej
05/12/2021, 5:14 PMsecurityContext:
runAsUser: 1000
runAsGroup: 1000
Hence the user 1000 is unable to run conda install because of not root privilege
NotWritableError: The current user does not have write permissions to a required path.
path: /opt/conda/pkgs/urls.txt
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /opt/conda/pkgs/urls.txt
Kevin Kho
Matej
05/12/2021, 5:19 PMprefecthq/prefect:latest
for the worker image?Kevin Kho
Kevin Kho
Matej
05/12/2021, 5:21 PMMatej
05/12/2021, 5:21 PMMatej
05/12/2021, 5:22 PMKevin Kho
Kevin Kho
Matej
05/12/2021, 5:46 PMKevin Kho
Matej
05/12/2021, 5:47 PMKevin Kho
Matej
05/12/2021, 5:49 PMTraceback (most recent call last):
File "/usr/local/bin/dask-scheduler", line 5, in <module>
from distributed.cli.dask_scheduler import go
File "/usr/local/lib/python3.8/site-packages/distributed/cli/dask_scheduler.py", line 120, in <module>
def main(
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 247, in decorator
_param_memo(f, OptionClass(param_decls, **option_attrs))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 2467, in __init__
super().__init__(param_decls, type=type, multiple=multiple, **attrs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 2106, in __init__
raise ValueError(
ValueError: 'default' must be a list when 'multiple' is true.
shceduler pod logsMatej
05/12/2021, 5:49 PM(base) m@desktop:~/repo/kubernetes/dask$ k logs dask-worker-7b55c8bb7-4fsft
Traceback (most recent call last):
File "/usr/local/bin/dask-worker", line 8, in <module>
sys.exit(go())
File "/usr/local/lib/python3.8/site-packages/distributed/cli/dask_worker.py", line 461, in go
check_python_3()
File "/usr/local/lib/python3.8/site-packages/distributed/cli/utils.py", line 32, in check_python_3
_unicodefun._verify_python3_env()
AttributeError: module 'click._unicodefun' has no attribute '_verify_python3_env'
worker podsMatej
05/12/2021, 5:51 PMKevin Kho
prefecthq/prefect:0.14.17-python3.8
. Just dropping the version downMatej
05/12/2021, 5:57 PMKevin Kho
Kevin Kho
Matej
05/12/2021, 5:59 PMMatej
05/12/2021, 6:02 PMKevin Kho
Matej
05/12/2021, 6:03 PMMatej
05/12/2021, 6:04 PMDask needs bokeh >= 0.13.0 for the dashboard.
Kevin Kho
Matej
05/12/2021, 6:05 PMKevin Kho
Matej
05/12/2021, 6:06 PMMatej
05/13/2021, 5:27 AMnvidia 34041856 87 nvidia_modeset,nvidia_uvm, Live 0xffffffffc0ce0000 (POE)
Traceback (most recent call last):
File "/usr/local/bin/dask-scheduler", line 5, in <module>
from distributed.cli.dask_scheduler import go
File "/usr/local/lib/python3.7/site-packages/distributed/cli/dask_scheduler.py", line 119, in <module>
@click.version_option()
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 247, in decorator
_param_memo(f, OptionClass(param_decls, **option_attrs))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 2467, in __init__
super().__init__(param_decls, type=type, multiple=multiple, **attrs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 2108, in __init__
) from None
ValueError: 'default' must be a list when 'multiple' is true.
Kevin Kho
click
. The CLI packageMatej
05/13/2021, 4:30 PMKevin Kho