我在使用从CircleCI启动的GCP Dataflow runner运行python Apache光束管道时遇到了严重的问题。如果有人能给我一些关于如何解决这个问题的提示,我将不胜感激,我已经尝试了所有的方法,但似乎都不起作用。
基本上,我运行的是在数据流中运行并使用google-api-python-client-1.12.3的python Apache光束管道。如果我在我的机器(python3 main.py --runner dataflow --setup_file /path/to/my/file/setup.py)中运行该作业,它就能正常工作。如果我从CircleCI中运行相同的作业,则会创建数据流作业,但它会失败,并显示一条ImportError: No module named 'apiclient'消息。
通过查看this documentation,我认为我可能应该明确地使用requirements.txt文件。如果我从CircleCI运行相同管道,但将--requirements_file参数添加到包含一行(google-api-python-client==1.12.3)的需求文件中,数据流作业将失败,因为工作进程也会失败。在日志中,有一条info消息first ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)",它会导致后来的错误消息"Error syncing pod somePodIdHere (\"dataflow-myjob-harness-rl84_default(somePodIdHere)\"), skipping: failed to \"StartContainer\" for \"python\" with CrashLoopBackOff: \"back-off 40s restarting failed container=python pod=dataflow-myjob-harness-rl84_default(somePodIdHere)\"。我找到了this thread,但这个解决方案在我的情况下似乎不起作用。
任何帮助都会非常非常感谢。提前谢谢你!
发布于 2020-10-14 07:57:40
这个问题看起来和你的非常相似。解决方案似乎是显式地将需求的依赖项包含在requirements.txt中
https://stackoverflow.com/questions/64333740
复制相似问题