Krystian
03/18/2025, 11:06 AMMarvin
03/18/2025, 11:06 AMprefect.yaml
file, reference the custom Docker image directly. You won't need to include push or pull steps if the image is already available in the registry.
3. Using flow.deploy
: Use the flow.deploy
method to deploy your flow. Ensure your flow is defined in a Python file and include a call to flow.deploy
with the necessary configuration for your work pool and image.
4. Push to Registry: If you need to push the image to a registry, you can set push=True
in the deployment script. This will push the image to your specified Docker registry.
5. Run Your Script: Execute your script to deploy the flow. This process will build a Docker image containing your flow code and dependencies, then create a deployment associated with the specified work pool and image.
For more detailed guidance, you can refer to the Prefect documentation on deploying with Docker.
If you're interested in using cloud-provider storage for your flow code, Prefect supports fsspec-compatible storage solutions like AWS S3, Azure Blob Storage, or GCP GCS.
For further reading, you can explore:
- Storing Flow Code
- Deploying via Python