Gustavo de Paula
08/11/2021, 8:51 PMpython >= 3.8
. When running it with the local agent, it works fine, but when I try to run it with the kubernetes agent, using as image one that extends prefecthq/prefect:latest-python3.8
, I get a python version mismatch error saying that it is trying to run the flow with a python 3.7.10. Is there a way I can change this python version?Kevin Kho
Gustavo de Paula
08/11/2021, 9:07 PMKevin Kho
Gustavo de Paula
08/11/2021, 9:11 PMFailed to load and execute Flow's environment: StorageError('An error occurred while unpickling the flow:\n ModuleNotFoundError("No module named \'My_lib\'")\nThis may be due to one of the following version mismatches between the flow build and execution environments:\n - python: (flow built with \'3.8.11\', currently running with \'3.7.10\')\nThis also may be due to a missing Python module in your current environment. Please ensure you have all required flow dependencies installed.')
Kevin Kho
Gustavo de Paula
08/11/2021, 9:12 PMKevin Kho
Gustavo de Paula
08/11/2021, 9:14 PMwith My_Flow("My flow2", storage=Azure(container="flows",connection_string = 'my_connection_string')) as flow:
flow.run_config=KubernetesRun(labels=["kubeagent"])
Gustavo de Paula
08/11/2021, 9:16 PMKevin Kho
Gustavo de Paula
08/11/2021, 9:33 PMKevin Kho
KubernetesRun(image="xxx", labels=["xxx"])
Kevin Kho
storage=Azure(container="flows",connection_string = 'my_connection_string', stored_as_script=True))
so that this flow will not get serialized?Gustavo de Paula
08/11/2021, 9:48 PMGustavo de Paula
08/13/2021, 5:22 PMKevin Kho
Kevin Kho
Gustavo de Paula
08/13/2021, 6:00 PMGustavo de Paula
08/13/2021, 6:01 PMFROM python:3.8.11-slim
RUN apt update
RUN apt install -y python-pyodbc
RUN apt install tini
RUN pip install my-custom-package
RUN pip install prefect[Kubernetes] azure-storage-blob
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["tini", "-g", "--", "entrypoint.sh"]
Kevin Kho
Kevin Kho
Gustavo de Paula
08/13/2021, 6:06 PMGustavo de Paula
08/13/2021, 6:09 PMGustavo de Paula
08/13/2021, 6:41 PMKevin Kho
RUN pip install prefect[Kubernetes] azure-storage-blob
. Did you use big K or small k? I think this needs to be smallGustavo de Paula
08/13/2021, 6:46 PMKevin Kho
Gustavo de Paula
08/13/2021, 6:55 PMKevin Kho
Gustavo de Paula
08/13/2021, 8:13 PMKevin Kho