【发布时间】:2022-09-27 22:58:31
【问题描述】:
交叉发布这个问题:https://github.com/PrefectHQ/prefect/discussions/6868
我有一个使用 Prefect v1.3.1 的最小项目,您可以在这里找到:https://github.com/b-long/aid。在从本机代码迁移到 dockerized 代码之后,我在正确部署时遇到了一点困难。我正在使用最新版本的 Prefect v1,需要先解决这个问题,然后才能迁移到 Prefect 2.x
我正在使用 Poetry,但我很确定这里有一个适用于 Hatch、Pipenv、Flit 或其他工具的模式。在注册中观察到问题,该问题在最后记录:
ModuleNotFoundError: No module named \'aid\'
The command \'/bin/sh -c python /opt/prefect/healthcheck.py \'[\"/opt/prefect/flows/basic-pandas-flow.prefect\"]\' \'(3, 10)\'\' returned a non-zero code: 1
Traceback (most recent call last):
...
ValueError: Your docker image failed to build! Your flow might have failed one of its deployment health checks - please ensure that all necessary files and dependencies have been included.
如果你是一个 Prefect Guru,我猜你可以通过阅读日志文件(参见上面链接的讨论)并查看我的 Dockerfile 来解决这个问题:https://github.com/b-long/aid/blob/main/Dockerfile.prefect