# prefect-community

Miles Lauridsen

09/10/2022, 12:26 AM
Hi all. Having some issues trying to run a basic Prefect flow in a docker instance. Works fine on my local machine (outside docker) but then when run in a container outputs this error. Any suggestions for usage?

Anna Geller

09/10/2022, 12:48 AM
moving here to keep channel clean:
Copy code
Traceback (most recent call last):
  File "/home/v/.local/lib/python3.8/site-packages/asgi_lifespan/_concurrency/", line 44, in run_and_fail_after
    await asyncio.wait_for(coroutine(), timeout=seconds)
  File "/usr/local/lib/python3.8/asyncio/", line 501, in wait_for
    raise exceptions.TimeoutError()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/", line 71, in <module>
  File "/home/v/.local/lib/python3.8/site-packages/prefect/", line 384, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/home/v/.local/lib/python3.8/site-packages/prefect/", line 158, in enter_flow_run_engine_from_flow_call
  File "/home/v/.local/lib/python3.8/site-packages/anyio/_core/", line 70, in run
    return, *args, **backend_options)
  File "/home/v/.local/lib/python3.8/site-packages/anyio/_backends/", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/usr/local/lib/python3.8/asyncio/", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.8/asyncio/", line 616, in run_until_complete
    return future.result()
  File "/home/v/.local/lib/python3.8/site-packages/anyio/_backends/", line 287, in wrapper
    return await func(*args)
  File "/home/v/.local/lib/python3.8/site-packages/prefect/", line 101, in with_injected_client
    async with client_context as client:
  File "/home/v/.local/lib/python3.8/site-packages/prefect/", line 1905, in __aenter__
    self._ephemeral_lifespan = await self._exit_stack.enter_async_context(
  File "/usr/local/lib/python3.8/", line 568, in enter_async_context
    result = await _cm_type.__aenter__(cm)
  File "/usr/local/lib/python3.8/", line 171, in __aenter__
    return await self.gen.__anext__()
  File "/home/v/.local/lib/python3.8/site-packages/prefect/", line 185, in app_lifespan_context
    await context.__aenter__()
  File "/home/v/.local/lib/python3.8/site-packages/asgi_lifespan/", line 90, in __aenter__
    await self.startup()
  File "/home/v/.local/lib/python3.8/site-packages/asgi_lifespan/", line 31, in startup
    await self._concurrency_backend.run_and_fail_after(
  File "/home/v/.local/lib/python3.8/site-packages/asgi_lifespan/_concurrency/", line 46, in run_and_fail_after
    raise TimeoutError
my suggestion would be to either: 1. run it without Docker since Docker is not required because Orion is so lightweight - Conda virtual env is usually enough to get started and have env isolation 2. try out prefect Cloud 3. use this docker compose setup

Miles Lauridsen

09/10/2022, 2:03 AM
I’m currently running it on a machine that allows docker but a local conda/python env isn’t an option. Cloud isn’t an option as it needs to stay behind a firewall. Will see if Conda in Docker solves whatever the conflict is.