William Grim
02/24/2022, 6:29 PMDocekrStorage
, and my Dockerfile
looks like the below. It gets through all the steps except the final step with an error. Does anyone know how to resolve this?Kevin Kho
02/24/2022, 6:33 PMWilliam Grim
02/24/2022, 6:36 PMDockerStorage
?Kevin Kho
02/24/2022, 6:40 PMKubernetesRun(image="…")
and then your Storage becomes LocalStorage(path_to_file="some/path/in/container/flow.py")
or something like that.build=False
in the register callWilliam Grim
02/24/2022, 6:45 PMStep 16/16 : RUN python /opt/prefect/healthcheck.py '["/opt/prefect/flows/dbt.prefect"]' '(3, 8)'
---> Running in 24a30f5c6416
Beginning health checks...
System Version check: OK
/opt/prefect/healthcheck.py:152: UserWarning: Flow uses module which is not importable. Refer to documentation on how to import custom mo
dules <https://docs.prefect.io/api/latest/storage.html#docker>
flows = cloudpickle_deserialization_check(flow_file_paths)
Traceback (most recent call last):
File "/opt/prefect/healthcheck.py", line 152, in <module>
flows = cloudpickle_deserialization_check(flow_file_paths)
File "/opt/prefect/healthcheck.py", line 44, in cloudpickle_deserialization_check
flows.append(cloudpickle.loads(flow_bytes))
ModuleNotFoundError: No module named 'prefect.backend'
The command '/bin/sh -c python /opt/prefect/healthcheck.py '["/opt/prefect/flows/dbt.prefect"]' '(3, 8)'' returned a non-zero code: 1
Error building storage:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/cli/build_register.py", line 463, in build_and_register
storage.build()
File "/usr/local/lib/python3.8/site-packages/prefect/storage/docker.py", line 308, in build
self._build_image(push=push)
File "/usr/local/lib/python3.8/site-packages/prefect/storage/docker.py", line 373, in _build_image
raise ValueError(
ValueError: Your docker image failed to build! Your flow might have failed one of its deployment health checks - please ensure tha
t all necessary files and dependencies have been included.
Registering 'dbt'... Error
Dockerfile
contents:
FROM prefecthq/prefect:latest-python3.8
ENV PIP_NO_CACHE_DIR=1
# Copying some stuff from our repo into the image.
COPY workflows /workflows
COPY app /app
RUN pip install -r workflows/requirements.txt
RUN pip install -e /workflows
RUN pip install -e /app
ENV PYTHONPATH=/
Kevin Kho
02/24/2022, 6:47 PMWilliam Grim
02/25/2022, 10:26 PMSarah Floris
03/15/2022, 9:24 PMKevin Kho
03/15/2022, 9:37 PM