Skip to content

Commit

Permalink
fix: updates to APT packages list and the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sr-murthy committed May 4, 2024
1 parent 5f2ee1f commit acf7fc8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
91 changes: 45 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:18.04

MAINTAINER The HDF-EOS Tools and Information Center <eoshelp@hdfgroup.org>

Expand All @@ -9,56 +9,55 @@ COPY ["./apt.txt", "./"]
RUN apt update && apt install -yq $(grep -vE "^\s*#" ./apt.txt)

#Build HDF4 lib.
ARG HDF4_VER=4.2.13
RUN wget https://observer.gsfc.nasa.gov/ftp/edhs/hdfeos/latest_release/hdf-${HDF4_VER}.tar.gz; \
tar zxvf hdf-${HDF4_VER}.tar.gz; \
cd hdf-${HDF4_VER}; \
./configure --prefix=/usr/local/ --disable-netcdf; \
make && make check && make install; \
cd ..; \
rm -rf /hdf-${HDF4_VER} /hdf-${HDF4_VER}.tar.gz
ARG HDF4_VER=4.2.16
RUN wget https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF4/HDF${HDF4_VER}-2/src/hdf-${HDF4_VER}-2.tar.gz && \
tar zxvf hdf-${HDF4_VER}-2.tar.gz && \
cd hdf-${HDF4_VER}-2 && \
./configure --prefix=/usr/local/ --enable-shared --disable-netcdf --disable-fortran && \
make && make check && make install && \
cd .. && \
rm -f hdf-${HDF4_VER}-2.tar.gz

#Build HDF-EOS2 lib.
ARG HDFEOS_VER=2.19v1.00
RUN wget https://observer.gsfc.nasa.gov/ftp/edhs/hdfeos/previous_releases/HDF-EOS${HDFEOS_VER}.tar.Z; \
tar zxvf HDF-EOS${HDFEOS_VER}.tar.Z; \
cd hdfeos; \
./configure --prefix=/usr/local/ --enable-install-include --with-hdf4=/usr/local; \
make && make check && make install; \
cd ..; \
rm -rf /hdfeos /HDF-EOS${HDFEOS_VER}.tar.Z
ARG HDFEOS_VER=3.0
RUN wget -O hdf-eos2-${HDFEOS_VER}-src.tar.gz https://git.earthdata.nasa.gov/projects/DAS/repos/hdfeos/raw/hdf-eos2-${HDFEOS_VER}-src.tar.gz?at=3128a738021501c821549955f6c78348e5f33850 && \
tar zxvf hdf-eos2-${HDFEOS_VER}-src.tar.gz && \
cd hdf-eos2-${HDFEOS_VER} && \
./configure --prefix=/usr/local/ --enable-install-include --with-hdf4=/usr/local && \
make && make check && make install && \
cd .. && \
rm -f hdf-eos2-${HDFEOS_VER}-src.tar.gz

# Build HDF5 lib.
ARG HDF5_VER=5-1.8.19
RUN wget https://observer.gsfc.nasa.gov/ftp/edhs/hdfeos5/latest_release/hdf${HDF5_VER}.tar.gz; \
tar zxvf hdf${HDF5_VER}.tar.gz; \
cd hdf${HDF5_VER}; \
./configure --prefix=/usr/local/; \
make && make check && make install; \
cd ..; \
rm -rf /hdf${HDF5_VER}/hdf${HDF5_VER}.tar.gz
ARG HDF5_VER=1.14.4-2
ARG HDF5_DOTVER=1.14.4.2
RUN wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_${HDF5_DOTVER}/hdf5-${HDF5_VER}.tar.gz && \
tar zxvf hdf5-${HDF5_VER}.tar.gz && \
cd hdf5-${HDF5_VER} && \
./configure --prefix=/usr/local/ && \
make && make check && make install && \
cd .. && \
rm -f hdf5-${HDF5_VER}.tar.gz

# Build netCDF C lib.
ARG NETCDF_C_VER=4.4.1.1
RUN wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-${NETCDF_C_VER}.tar.gz -P /tmp \
&& tar -xf /tmp/netcdf-${NETCDF_C_VER}.tar.gz -C /tmp \
&& cd /tmp/netcdf-${NETCDF_C_VER} \
&& CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LD_LIBRARY_PATH=-L/usr/local/lib ./configure --prefix=/usr/local --enable-shared \
&& cd /tmp/netcdf-${NETCDF_C_VER} \
&& make \
&& cd /tmp/netcdf-${NETCDF_C_VER} \
&& make install \
&& rm -rf /tmp/netcdf-${NETCDF_C_VER}.tar.gz
ARG NETCDF_C_VER=4.9.2
RUN wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_C_VER}.tar.gz && \
tar zxvf v${NETCDF_C_VER}.tar.gz && \
cd netcdf-c-${NETCDF_C_VER} && \
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LD_LIBRARY_PATH=-L/usr/local/lib && \
./configure --prefix=/usr/local --disable-byterange --enable-shared --enable-hdf4 --enable-hdf4-file-tests && \
make && make check && make install && \
cd .. && rm -rf netcdf-c-${NETCDF_C_VER} && rm -f v${NETCDF_C_VER}.tar.gz

# Build H4CF Conversion Toolkit
ARG H4CF_VER=1.2
RUN wget http://hdfeos.org/software/h4cflib/h4cflib_${H4CF_VER}.tar.gz; \
tar zxvf h4cflib_${H4CF_VER}.tar.gz; \
cd h4cflib_${H4CF_VER} \
&& CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LD_LIBRARY_PATH=-L/usr/local/lib \
./configure --prefix=/usr/local/ --with-hdf4=/usr/local/ --with-hdfeos2=/usr/local/ --with-netcdf=/usr/local/; \
make && make install; \
cd ..; \
rm -rf /h4cflib_${H4CF_VER} /hf4cflib_${H4CF_VER}.tar.gz

ENV LD_LIBRARY_PATH /usr/local/lib
ARG H4CF_VER=1.3
RUN wget http://hdfeos.org/software/h4cflib/h4cflib_${H4CF_VER}.tar.gz && \
tar zxvf h4cflib_${H4CF_VER}.tar.gz && \
cd h4cflib_${H4CF_VER} && \
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LD_LIBRARY_PATH=-L/usr/local/lib && \
./configure --prefix=/usr/local/ --with-hdf4=/usr/local/ --with-hdfeos2=/usr/local/ --with-netcdf=/usr/local/ && \
make && make install && \
cd .. && \
rm -f hf4cflib_${H4CF_VER}.tar.gz

ENV LD_LIBRARY_PATH /usr/local/lib
1 change: 1 addition & 0 deletions apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ bzip2
tar
libghc-zlib-dev
libjpeg-dev
libxml2-dev
gfortran
bison
flex
Expand Down

0 comments on commit acf7fc8

Please sign in to comment.