Hey <@ULVA73B9P>, how do I run a docker image as a...
# ask-marvin
s
Hey @Marvin, how do I run a docker image as a task on my kubernetes workpool
m
To run a Docker image as a task on your Kubernetes workpool, you can base it off of one of the provided
prefecthq/prefect
images, or build your own image. Prefect work pools that use containers refer to the
2-latest
image by default. You can specify another image at work pool creation. The work pool image choice can be overridden in individual deployments. Here's an example Dockerfile for building an image based on
prefecthq/prefect:2-latest
, but with
scikit-learn
installed:
Copy code
Dockerfile
FROM prefecthq/prefect:2-latest 
RUN pip install scikit-learn
You can view and edit configured work pools in the Prefect UI. To view work pools with the Prefect CLI, you can use the following commands: -
prefect work-pool ls
lists all configured work pools for the server. -
prefect work-pool inspect
shows the details of a single pool. -
prefect work-pool preview
shows scheduled work for a single pool. For more details, you can refer to the Docker guide and the work pools guide in the Prefect documentation.