Prefect projects are a great way to create and manage your deployments. A project is a directory of code and configuration for your workflows that can be customized for portability. Read more about projects in the docs.
pip install prefect>=2.10.4
The commands I used in the video are:
- Clone the tutorial:
git clone git@github.com/PrefectHQ/hello-projects.git (or git clone https://github.com/PrefectHQ/hello-projects) cd hello-projects
- Starting a worker:
prefect worker start -t docker -p docker-work
- Viewing available project recipes, making it easy to initialize a project with a more opinionated structure suited to a particular use:
prefect project recipe ls
- Initializing a project that uses a recipe, in this case
docker-git
:prefect project init --recipe docker-git
- Deploy your flow*:
prefect deploy -f log-flow \ -n my-first-log-flow-deployment \ -p docker-work
*Note that Prefect has automatically done a few things for you:
- registered the existence of this flow with your local project
- created a description for this deployment based on the docstring of your flow function
- parsed the parameter schema for this flow function in order to expose an API for running this flow