How to place the python packages to be install (us

2019-08-02 16:41发布

I am trying to run my app in GCP App engine. My Requirements.txt file looks like below:

pillow==5.1.0
pybase64==0.4.0
poppler-utils==0.68.0 

Poppler-utils can be installed only using sudo apt-get in GCP command line tool. How can I give it in requirements.txt so that the app installs that package alone using sudo apt-get command ?

1条回答
再贱就再见
2楼-- · 2019-08-02 17:27

The requirements.txt file is specific to pip and can only include Python packages.

If you need to install an OS-level package (with apt-get), you'll need to use the Docker based App Engine Flexible environment (Standard doesn't provide this functionality) and create a custom runtime.

You can find a Dockerfile example here extending the default python image:

FROM gcr.io/google-appengine/python

You'll then need to add the poppler-utils package via:

RUN apt-get install poppler-utils

You'll find more information about building custom runtimes for App Engine Flexible here.

查看更多
登录 后发表回答