简体   繁体   中英

How to place the python packages to be install (using apt-get) in requirements.txt in GCP app engine

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 ?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM