Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-stage gdal build #133

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# instead of building from source, we will use the gdal image from osgeo
# FROM ghcr.io/osgeo/gdal:ubuntu-small-2.4.0 as gdal
FROM osgeo/gdal:alpine-normal-v2.4.1 as gdal

FROM python:3.9-buster

COPY --from=gdal /usr/local/bin/gdal* /usr/local/bin/

ENV DEBIAN_FRONTEND noninteractive
ENV PY_SAX_PARSER=hs_core.xmlparser

Expand Down Expand Up @@ -57,16 +63,6 @@ RUN HDF5_INCDIR=/usr/include/hdf5/serial
RUN pip install --upgrade pip
RUN pip install 'setuptools<58.0.0'

RUN wget https://ftp.osuosl.org/pub/osgeo/download/gdal/2.4.1/gdal-2.4.1.tar.gz \
&& tar -xzf gdal-2.4.1.tar.gz \
&& rm gdal-2.4.1.tar.gz

WORKDIR /gdal-2.4.1
RUN ./configure --with-python --with-geos=yes \
&& make \
&& sudo make install \
&& sudo ldconfig
WORKDIR /

# TODO: iROds 4.2.x is holding us to Debian Buster which is EOL. It also requires libssl1.0.0 which is obsolete
# we should upgrade to iRods 4.3, Debian Bullseye, etc but this will require at a minimum, changes to our iinit use in HS
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ foresite@git+https://github.com/sblack-usu/foresite-toolkit.git@94c0c2a8e21a922c
freezegun==1.4.0
funcsigs==1.0.2
future==0.18.3
GDAL==2.4.1
GDAL==2.4.0
google-cloud-pubsub==2.21.2
geographiclib==1.52
geojson==1.3.2
Expand Down
Loading