I tried following this:
https://orion-docs.prefect.io/tutorials/docker-flow-runner/
The first time, I didn’t run prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
The second time, I ran that, but I used local storage, but I saw this line:
" * A remote Storage configuration, not Local Storage or Temporary Local Storage."
The third time, I ran with GCS and meticulously followed the tutorial, but I still get the following:
10:26:02.698 | INFO | prefect.flow_runner.docker - Flow run 'adamant-longhorn' has container settings = {'image': 'prefecthq/prefect:2.0a13-python3.9', 'network': None, 'command': ['python', '-m', 'prefect.engine', '2b297873-9449-4a9f-b4a1-22921851b594'], 'environment': {'PREFECT_API_URL': 'http://host.docker.internal:4200/api'}, 'auto_remove': False, 'labels': {'io.prefect.flow-run-id': '2b297873-9449-4a9f-b4a1-22921851b594'}, 'extra_hosts': None, 'name': 'adamant-longhorn', 'volumes': []}
10:26:02.902 | INFO | prefect.agent - Completed submission of flow run '2b297873-9449-4a9f-b4a1-22921851b594'
10:26:02.918 | INFO | prefect.flow_runner.docker - Flow run container 'adamant-longhorn' has status 'running'
17:26:11.331 | ERROR | prefect.engine - Engine execution of flow run '2b297873-9449-4a9f-b4a1-22921851b594' exited with unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/prefect/engine.py", line 951, in <module>
enter_flow_run_engine_from_subprocess(flow_run_id)
File "/usr/local/lib/python3.9/site-packages/prefect/engine.py", line 134, in enter_flow_run_engine_from_subprocess
return anyio.run(retrieve_flow_then_begin_flow_run, flow_run_id)
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 56, in run
return asynclib.run(func, *args, **backend_options)
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 233, in run
return native_run(wrapper(), debug=debug)
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 228, in wrapper
return await func(*args)
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 81, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prefect/engine.py", line 199, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_deployment(deployment, client=client)
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 81, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prefect/deployments.py", line 329, in load_flow_from_deployment
maybe_flow = await client.resolve_datadoc(deployment.flow_data)
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 1695, in resolve_datadoc
return await resolve_inner(datadoc)
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 1688, in resolve_inner
data = await self.retrieve_data(data)
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 1259, in retrieve_data
return await storage_block.read(embedded_datadoc)
File "/usr/local/lib/python3.9/site-packages/prefect/blocks/storage.py", line 118, in read
async with await anyio.open_file(storage_path, mode="rb") as fp:
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_fileio.py", line 156, in open_file
fp = await to_thread.run_sync(open, file, mode, buffering, encoding, errors, newline,
File "/usr/local/lib/python3.9/site-packages/anyio/to_thread.py", line 28, in run_sync
return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 818, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 754, in run
result = context.run(func, *args)
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/tb/fksvh8ms2hl5xnzwrftnx66r0000gq/T/prefect/b52c01e1-972d-46eb-b82b-bce53d68baaa'
10:26:11.800 | INFO | prefect.flow_runner.docker - Flow run container 'adamant-longhorn' has status 'exited'
b52...
is my deployment UUID I think.
Also, to reduce the tediousness of getting started, I feel like there should be a prefect orion quick-start
which encompasses all the steps below. There seems to be a lot of steps to just get started with a deployment for docker.
- prefect orion start
- prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
- prefect storage create
- prefect work-queue create tut-work-queue
- prefect agent start ‘’