Do google cloud functions pip install every time one is invoked or just when you deploy it?

Viewed 145

Do google cloud functions pip install every time one is invoked or just when you deploy it?

1 Answers

pip install is only done during deployment of the function. Basically, the deployment process would be:

  1. Upload the function's source code to GCS.
  2. Build container image from the src in Cloud Build, in which one of the step is installing packages (pip install).
  3. Cloud Functions uses the container image to execute the function.
Related