Denys Volokh
07/28/2022, 3:38 AMKV Store operations are only supported while using Prefect Cloud as a backend
and here is my setup:
1. My flow and run config using KubernetesRun:
with Flow(
name="Import Benchmark Index Data",
storage=Local(
path="/app/workflows/benchmarks/flow_import_index_data.py",
stored_as_script=True,
),
run_config=KubernetesRun(
image="prefect-workflows:latest",
image_pull_policy="Always",
),
) as flow:
benchmarks_states = task_fetch_benchmarks_state()
2. Docker file for prefect-workflows image
FROM prefecthq/prefect:1.2.4-python3.9
WORKDIR /app
ADD . .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install -e .
RUN prefect backend cloud
3. Agent configuration:Anna Geller
07/28/2022, 12:16 PMfrom prefect.backend import set_key_value
key_value_uuid = set_key_value(key="foo", value="bar")
https://docs-v1.prefect.io/orchestration/concepts/kv_store.html