how do i set/access environment variables with a d...
# ask-community
a
how do i set/access environment variables with a dask executor? i had been setting them with my runconfig, but when i switched to a dask executor they arent showing up anymore
k
It’s the worker that doesn’t have the environment variable. I think the Flow has them right? You can add them to DaskExecutor on startup normally using the kwargs of your cluster type. You can also add it to the worker image or use the KV store/Prefect secret (but I think you’re on server)
a
im on cloud
i think putting them in daskexecutor on startup makes the most sense for me tho
k
Ah ok, using the KV Store potentially might be less work to get that to the workers (but really it should be added on cluster creation). What type of Dask cluster are you using?
a
k
KubeCluster
takes in an
env
argument. You can try passing the environment variable to that.
a
ok that worked thx