David Michael Gang
David Michael Gang

Reputation: 7299

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 ?

Upvotes: 0

Views: 342

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75920

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.

Upvotes: 1

Related Questions