so I have my flow in one file and then the tasks i...
# prefect-community
s
so I have my flow in one file and then the tasks in another file. I finally got them to play nicely with Docker storage, but now in the RUN python /opt/prefect/healthcheck.py, it can't find the file that is in the same folder as the flow.
Copy code
System Version check: OK
/opt/prefect/healthcheck.py:130: UserWarning: Flow uses module which is not importable. Refer to documentation on how to import custom modules <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 130, in <module>
    flows = cloudpickle_deserialization_check(flow_file_paths)
  File "/opt/prefect/healthcheck.py", line 43, in cloudpickle_deserialization_check
    flows.append(cloudpickle.loads(flow_bytes))
ModuleNotFoundError: No module named "Module"
k
Did you build this image beforehand or do you intend for DockerStorage to build it?
s
Build this image beforehand.
k
When you register then, you can do
flow.register(build=False)
s
Sweet. I will try that.
Thank you!
k
This is a similar thread. He just moved his traceback to the end
Oh yeah I just remembered from this thread you can do Local storage + KubernetesRun to point to your flow file inside the container
s
Wait can you explain that?
k
There is an example in the thread with William.
LocalStorage
will look for the file relative to the container