Skip to content

Commit

Permalink
attempt multi-stage gdal build
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jul 18, 2024
1 parent 1533d81 commit f07cbeb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
26 changes: 17 additions & 9 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,18 @@ 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
# 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 /


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

0 comments on commit f07cbeb

Please sign in to comment.