juana
10/04/2024, 12:33 AMMarvin
10/04/2024, 12:33 AMshell
prefect work-pool create --type docker my-docker-pool
2. Start a Docker Worker:
When starting a docker worker, you do not directly add the auto-remove option through a command-line flag like you might in raw Docker. Instead, you'll define this option within the configuration of your Docker infrastructure or when deploying your flow.
3. Run your Docker Worker:
You can start a worker by using Prefect's CLI command to start polling from your work pool:
shell
prefect worker start --pool my-docker-pool
When configuring your Docker infrastructure programmatically, you would typically use the auto_remove
setting within your Docker task code or configuration where the Docker container is executed.
For specific implementations or further configuration, refer to the Docker infrastructure examples in Prefect documentation.
You can check your container settings and adjust the auto-remove option as needed within your flow's Docker configuration settings or by manually handling the Docker container lifecycle in a custom script.juana
10/04/2024, 12:36 AMMarvin
10/04/2024, 12:36 AM