Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Anaconda packages as dependencies for Google Cloud Functions?

I am writing a Google Cloud Function using the Python Runtime and I need to include some dependencies which are not available with pip. As described in the docs here, it should be possible to package local dependencies, however, in my case, I would like to use all the packages of a local Anaconda environment and upload them with the function. Is there a way to do so?

Or alternatively, is there a way to specify Anaconda packages in the requirements.txt file instead of using pip?

like image 210
gorkamorka Avatar asked Oct 16 '22 12:10

gorkamorka


1 Answers

No, it's not possible, Cloud Functions only supports installing from PyPI via pip.

You may be interested in using Cloud Run instead, which will allow you to define your own runtime, and thus install Anaconda packages via conda.

like image 108
Dustin Ingram Avatar answered Oct 19 '22 03:10

Dustin Ingram