From acf7fc896e3d423644a4402076b8a7a8e196a662 Mon Sep 17 00:00:00 2001 From: Sandeep Murthy Date: Sat, 4 May 2024 21:08:50 +0100 Subject: [PATCH] fix: updates to APT packages list and the Dockerfile --- Dockerfile | 91 +++++++++++++++++++++++++++--------------------------- apt.txt | 1 + 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed03b58..a52723e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:18.04 MAINTAINER The HDF-EOS Tools and Information Center @@ -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 \ No newline at end of file +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 diff --git a/apt.txt b/apt.txt index 0946c09..062b250 100644 --- a/apt.txt +++ b/apt.txt @@ -6,6 +6,7 @@ bzip2 tar libghc-zlib-dev libjpeg-dev +libxml2-dev gfortran bison flex