When using docker as storage, in the call as below:
prefect register --project yourproject -p yourflow.py
It seems that perfect creates a tmp{randomNumber}
folder and puts healthcheck.py and a Dockerfile, which participate the docker build.
But I accidentally deleted the tmp
folder, even after I recovered it, it still throws the following error. What happened was that Prefect expected a tmp
folder with a new random_number as the suffix. How can I recover from it?
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.