Max Lei
03/01/2022, 7:23 PMDaskExecutor
, would DockerRun
be a good method to see if the dockerfile works or not?Anna Geller
Anna Geller
flow.executor = DaskExecutor(
# FargateCluster is just one example
cluster_class="dask_cloudprovider.aws.FargateCluster",
cluster_kwargs={"n_workers": 4, "image": "your-prefect-image"},
)
Max Lei
03/01/2022, 7:36 PMAnna Geller
Anna Geller
with Flow(
"Dask Kubernetes Flow",
storage=storage,
executor=DaskExecutor(
cluster_class=lambda: KubeCluster(make_pod_spec(image=prefect.context.image)),
adapt_kwargs={"minimum": 2, "maximum": 3},
),
run_config=KubernetesRun(),
) as flow:
this blog post gives more info https://medium.com/slateco-blog/prefect-x-kubernetes-x-ephemeral-dask-power-without-responsibility-6e10b4f2fe40Kevin Kho
Max Lei
03/01/2022, 7:53 PMDockerRun
be the closest option?Max Lei
03/01/2022, 7:54 PMKevin Kho
Anna Geller
Anna Geller
Anna Geller
docker run --rm -it image_name
and then within the container run some code to test if everything has been properly installed and configured?Kevin Kho
Anna Geller
Max Lei
03/01/2022, 8:03 PMMax Lei
03/01/2022, 8:05 PMFailed to load and execute Flow's environment: ModuleNotFoundError("No module named '/home/ubuntu/'")
. Is this a docker container issue or something else?Anna Geller
Kevin Kho
Max Lei
03/01/2022, 8:06 PMFROM prefecthq/prefect:0.11.4-python3.7
COPY ./dist/<PACKAGE_NAME_REMOVED>-0.0.0.tar.gz .
COPY requirements.txt .
COPY gh ./.config/
RUN apt update
RUN apt install -y curl
RUN curl -fsSL <https://cli.github.com/packages/githubcli-archive-keyring.gpg> | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] <https://cli.github.com/packages> stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
RUN apt update
RUN apt install -y build-essential gcc gh
RUN pip install setuptools==50.0.0
RUN pip install pip==20.2
RUN pip install pystan==2.17.1.0
RUN pip install fbprophet==0.7.1
RUN pip install -r requirements.txt
RUN pip install <PACKAGE_NAME_REMOVED>-0.0.0.tar.gz
WORKDIR /opt/prefect
COPY . /opt/prefect/flows/
Max Lei
03/01/2022, 8:07 PMMax Lei
03/01/2022, 8:07 PMDaskExecutor
?Anna Geller
Kevin Kho
Anna Geller
Max Lei
03/01/2022, 8:10 PMDockerRun(image="<IMAGE_NAME_REMOVED>:latest")
, nothing special used in the flows.Kevin Kho
Kevin Kho
fbprophet
is so hard to deploy from experience. Like a pip install isn’t enough cuz it has some compiling afterMax Lei
03/01/2022, 8:12 PMMax Lei
03/01/2022, 8:12 PMfbprophet
is in requirements it would break, so you need to install it before your requirements.Max Lei
03/01/2022, 8:13 PMKevin Kho
Anna Geller
Kevin Kho
Anna Geller
Max Lei
03/01/2022, 8:20 PMMax Lei
03/01/2022, 8:21 PMMatthias
03/01/2022, 8:44 PMBring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by