'Why should a python google cloud function not contain a Pipfile?

According to the documentation here

Dependency specification using the Pipfile/Pipfile.lock standard is currently not supported. Your project should not include these files.

I use Pipfile for managing my dependencies and create a requirements.txt file through

pipenv lock --requirements

Till now everything works and my gcloud function is up and running. So why should a python google cloud function not contain a Pipfile?

If it shouldn't contain, what is the preferred way suggested to manage an isolated environment ?



Solution 1:[1]

When you deploy your function, you deploy it on its own environment. You won't manage several environment because the cloud function deployment is dedicated to one and only one piece of code.

That's why, it's useless to have a virtual environment in a single usage environment. You could use Cloud Run to do that because you can customize your build and runtime environment. But, here again, it's useless: You won't have concurrent environment in the same container, it does not make sense.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 guillaume blaquiere