title: How to get GDAL to work with Google GCLOUD
body: <p>I am getting the below error trying to deploy my app to gcloud app engine.
  The whole problem is from trying to add the GDAL library to my app.</p>
  <blockquote>
  <p>File &quot;/opt/python3.7/lib/python3.7/ctypes/<strong>init</strong>.py&quot;, line 377, in
  <strong>getattr</strong>
  func = self.<strong>getitem</strong>(name)   File &quot;/opt/python3.7/lib/python3.7/ctypes/<strong>init</strong>.py&quot;, line 382, in
  <strong>getitem</strong>
  func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64</p>
  </blockquote>
  <p>I followed all the directions I could possibly find online. But nothing seems to work at all.
  Here is my app.yml files:</p>
  <pre><code>runtime: custom
  
  entrypoint: gunicorn -b :8080 app.wsgi
  env: flex 
  
  # any environment variables you want to pass to your application.
  # accessible through os.environ['VARIABLE_NAME']
  env_variables:
   ... 
    
  beta_settings:
    cloud_sql_instances: site:asia-northeast2:site-db
  
  handlers:
  - url: /.*
    script: auto
    secure: always
  manual_scaling: 
    instances: 1
  
  runtime_config:
    python_version: 3 
  </code></pre>
  <p>And Dockerfile:</p>
  <pre><code>FROM gcr.io/google-appengine/python
  #FROM python:3.7
  #FROM python:3.8.0-slim-buster
  
  EXPOSE 8080
  ENV PYTHONUNBUFFERED 1
  
  # Install GDAL dependencies
  #RUN apt-get update &amp;&amp; apt-get install --yes libgdal-dev
  RUN apt-get update &amp;&amp; apt-get install --reinstall -y \
    #libopenjp2-7 \
    #libopenjp2-7-dev \
    #libgdal-dev \
    binutils \
    gdal-bin \
    python-gdal \
    python3-gdal 
  
  
  # Update C env vars so compiler can find gdal
  #ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
  #ENV C_INCLUDE_PATH=/usr/include/gdal
  RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
  RUN export C_INCLUDE_PATH=/usr/include/gdal
  
  # Create a virtualenv for dependencies. This isolates these packages from
  # system-level packages.
  # Use -p python3 or -p python3.7 to select python version. Default is version 2.
  RUN virtualenv /env -p python3
  
  # Setting these environment variables are the same as running
  # source /env/bin/activate.
  ENV VIRTUAL_ENV /env
  ENV PATH /env/bin:$PATH
  
  # Copy the application's requirements.txt and run pip to install all
  # dependencies into the virtualenv.
  ADD requirements.txt /app/requirements.txt
  RUN pip install -r /app/requirements.txt
  # Add the application source code.
  ADD . /app
  
  # Run a WSGI server to serve the application. gunicorn must be declared as
  # a dependency in requirements.txt.
  CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 main:app --timeout 0 --preload
  </code></pre>
  <p>Someone help me here. What is it I need to do to get this working?</p>