Pascal Jahan Elahi (Pawsey)
01/24/2025, 3:36 AMMarvin
01/24/2025, 3:36 AMbash
docker run -p 4200:4200 --rm <http://ghcr.io/astral-sh/uv:python3.12-bookworm-slim|ghcr.io/astral-sh/uv:python3.12-bookworm-slim> uvx prefect server start --host 0.0.0.0
This command will start the server on port 4200.
2. Set Up Your Flow:
In your Python script, define your flow using the @flow
decorator. Here's a minimal example:
python
from prefect import flow
@flow
def my_flow():
print("Hello, Prefect!")
if __name__ == "__main__":
my_flow()
3. Run Your Flow:
With the Prefect server running, execute your flow script. The flow will connect to the local server and run there.
4. Monitor the Flow:
You can monitor the flow execution by accessing the Prefect UI at <http://localhost:4200>
.
For more detailed information, you can refer to the Prefect documentation on running local servers and this example.
If you have any specific requirements or encounter issues, feel free to ask.