0

I need a version of GDAL > 3 so I am installing from source and having an issue, this is the error I am getting.

make[2]: Leaving directory `/var/task'
12.28 cd .. && /bin/sh ./config.status src/proj_config.h
12.44 config.status: error: invalid argument: `src/proj_config.h'
12.44 make[1]: *** [stamp-h1] Error 1
12.44 make[1]: Leaving directory `/var/task/src'
12.45 make: *** [all-recursive] Error 1

Here is my Dokerfile

FROM public.ecr.aws/lambda/python:3.9

COPY . ${LAMBDA_TASK_ROOT}

RUN yum update -y && yum install wget -y && \
    yum clean all && yum install xz -y && \
    yum install gzip -y && \
    yum groups mark install "Development Tools" -y && \
    yum groups mark convert "Development Tools" -y && \
    yum groupinstall "Development Tools" -y && \
    yum install unzip -y

RUN yum install gcc-c++.x86_64 cpp.x86_64 sqlite-devel.x86_64 libtiff.x86_64 cmake3.x86_64 tar.x86_64 -y

RUN wget https://download.osgeo.org/proj/proj-6.1.1.tar.gz

RUN tar -zxf proj-6.1.1.tar.gz

RUN unzip -o ${LAMBDA_TASK_ROOT}/proj-datumgrid-1.7.zip -d ./proj-6.1.1/data/

RUN ./proj-6.1.1/configure --disable-dependency-tracking --prefix=/export/apps/proj/proj-6.1.1 && \
    make -j4 && \
    mkdir -p /export/apps/proj/proj-6.1.1 && \
    make install

RUN chown -R root:root /export/apps/proj/proj-6.1.1

ENV PROJ_LIB="/export/apps/proj/proj-6.1.1"

RUN wget https://github.com/OSGeo/gdal/releases/download/v3.2.1/gdal-3.2.1.tar.gz

RUN tar -zxf gdal-3.2.1.tar.gz

RUN ./gdal-3.2.1/configure --disable-dependency-tracking  --prefix=/export/apps/gdal/gdal-3.2.1 --with-proj=/export/apps/proj/proj-6.1.1 --with-python=/usr/bin/python && \
    make -j4 && \
    mkdir -p /export/apps/gdal/gdal-3.2.1 && \
    make install

RUN chown -R root:root /export/apps/gdal/gdal-3.2.1

RUN which gdalinfo; gdalinfo --version

RUN pip install gdal==3.2.1 Fiona==1.8.21 shapely geopandas

CMD ["lambda_function.lambda_handler"]

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.