使用 docker 作为存储时,调用如下:
prefect register --project yourproject -p yourflow.py
似乎完美创建了一个tmp{randomNumber}
文件夹并放置了 healthcheck.py 和一个 Dockerfile,它们参与了 docker 构建。
但是我不小心删除了tmp
文件夹,即使我恢复了它,它仍然会抛出以下错误。发生的事情是 Prefect 期望一个tmp
以新 random_number 作为后缀的文件夹。我怎样才能从中恢复?
Step 10/11 : COPY ./tmpnu2k398p/healthcheck.py /opt/prefect/healthcheck.py
COPY failed: stat /var/lib/docker/tmp/docker-builder531146691/tmpnu2k398p/healthcheck.py: no such file or directory
Error loading 'prefect_register_flow.py':
Traceback (most recent call last):
File "/Users/zhengxie1/workspace/cog_ana_model_train/venv/lib/python3.7/site-packages/prefect/cli/build_register.py", line 134, in load_flows_from_script
namespace = runpy.run_path(abs_path, run_name="<flow>")
File "/Users/zhengxie1/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/Users/zhengxie1/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/Users/zhengxie1/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/zhengxie1/workspace/cog_ana_model_train/prefect_register_flow.py", line 77, in <module>
flow.storage.build()
File "/Users/zhengxie1/workspace/cog_ana_model_train/venv/lib/python3.7/site-packages/prefect/storage/docker.py", line 303, in build
self._build_image(push=push)
File "/Users/zhengxie1/workspace/cog_ana_model_train/venv/lib/python3.7/site-packages/prefect/storage/docker.py", line 370, in _build_image
"Your docker image failed to build! Your flow might have "
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.