Deploying to Prefect¶
- Enter the root directory of geo-datasets and make sure you have the
uvCLI installed. If you don't have it yet, install it with: - Make sure you have your uv environment synced. If you haven't done this yet, run the following command:
- Link to Prefect Cloud and log in or connect to your self-hosted Prefect server. Make sure you have the correct API URL (and token for cloud) set in your environment variables.
Note: You may replace "prefect-staging" with "prefect-prod" when deploying to production. If you are using Prefect Cloud, you will also need to set your API token.
3a. If this is the a fresh install of the prefect server, you will need to initialize the work pool. You can do this by running the following command:uv run kubernetes/utilities/create-work-pool.pyand thenuv run prefect worker start --pool "geodata"``` - Run
deploy.pyfrom thescriptsdirectory, passing the name of the dataset directory (without "/datasets/") as an argument - You can now run deployments from the Prefect UI or CLI. To run via the Prefect UI, go to the Deployments menu, select which parameters you'd like to use, then submit the run. To run a deployment from the CLI, use the following command:
- Note: All dataset scripts should be able to run locally by using: