Hi, prefect team!! With prefect-server on k8s I wa...
# prefect-getting-started
t
Hi, prefect team!! With prefect-server on k8s I want to create a Git-based flow. How do I install the pip packages required on the python flow in this case?
n
hi @tig - you have a couple options: • build an image for your flow with its dependencies and then provide this as the
image
on your k8s work pool, or as a
job_variables
override on
image
for that deployment like this • provide
EXTRA_PIP_PACKAGES
as an
env
field on your work pool like
EXTRA_PIP_PACKAGES="pandas numpy"
using either of the above methods • use a
run_shell_script
action in your pull step to run
pip install pandas numpy ...
in your
pull
step of your deployment
šŸ‘€ 1
šŸ™ 1
the first is ideal, since you minimize the amount of times for these to install (not every time it runs), but you might prefer one of the latter if your external deps are few / you dont mind installing each time when the pod spins up
t
This way I can change the base pod settings used on the prefect-server side? I thought I had to use the docker based method and create an image for each flow and install the package there! Your input is very helpful!