hi I am trying to run a k8 worker (local k8 cluste...
# best-practices
y
hi I am trying to run a k8 worker (local k8 cluster) on my prefect server in docker container. I am able to run the job in the k8 worker now. but stucked at the preparing the right environment for the worker created pods for different jobs. How to specify prefect.yaml so that the packages get installed when pods are launched?
prefect.deployments.steps.pip_install_requirements
does not seem to work as well. will post my yaml file next
n
hi @Ying Ting Loo ill say that the generally you may want to build an image with your deps that you can use as the image on your work pool for this deployment, but if you want to install extra deps each time before your flow starts, you can set
EXTRA_PIP_PACKAGES
in the env on your work pool like
Copy code
work_pool:
    name: kubernetes-prd-internal-tools
    job_variables:
      env:
        EXTRA_PIP_PACKAGES: "numpy pandas"
or you can always use
run_shell_script
in your
pull
step as well to
pip install
stuff
y
how do i specify the right image for the pods when flow launches? is it here in the work pools > create > base job template > image? how do i configure the image to be pulled from a private ecr repository?