Commit 361dfb71 authored by Nick Bearson's avatar Nick Bearson
Browse files

initial changes to use alpine & musl; currently builds up through hdf5

parent 9933f15a
Pipeline #6017 failed with stages
# This image creates a common scientific build environment that includes: # This image creates a common scientific build environment that includes:
# gfortran, hdf4, hdf5, netcdf4 # gfortran, hdf4, hdf5, netcdf4
FROM gcc:latest FROM alpine:latest
ENV BUILD /build ENV BUILD /build
ENV OPT /opt ENV OPT /opt
...@@ -11,18 +11,19 @@ ENV ZLIB_VERSION 1.2.11 ...@@ -11,18 +11,19 @@ ENV ZLIB_VERSION 1.2.11
ENV JPEG_VERSION 6b ENV JPEG_VERSION 6b
ENV SZIP_VERSION 2.1 ENV SZIP_VERSION 2.1
ENV HDF4_VERSION 4.2.12 ENV HDF4_VERSION 4.2.12
ENV HDF5_VERSION 1.10.4 ENV HDF5_VERSION 1.10.5
ENV NC4F_VERSION 4.4.4 ENV NC4F_VERSION 4.4.5
ENV NC4C_VERSION 4.4.1 ENV NC4C_VERSION 4.6.1
ENV NCO_VERSION 4.6.1 ENV NCO_VERSION 4.6.1
ENV PYHDF_VERSION 0.9.0 ENV PYHDF_VERSION 0.9.0
ENV NETCDFPY_VERSION 1.2.4rel ENV NETCDFPY_VERSION 1.2.4rel
# grab some packages we need # grab some CORE packages we need
RUN apt-get update && apt-get install -y byacc bison diffutils flex make # WE LOST: byacc, screen
RUN apk update && apk add gcc gfortran g++ bison diffutils flex make libtirpc-dev gawk
# grab some convenience packages for using it as a build "machine" # grab some convenience packages for using it as a build "machine"
RUN apt-get install -y vim less tree screen unzip cvs subversion git gdb valgrind RUN apk add vim less tree unzip cvs subversion git gdb valgrind
# this is our install dir for everything non-core # this is our install dir for everything non-core
RUN mkdir -p ${OPT} RUN mkdir -p ${OPT}
...@@ -38,17 +39,7 @@ RUN mkdir -p ${BUILD} && cd ${BUILD} && \ ...@@ -38,17 +39,7 @@ RUN mkdir -p ${BUILD} && cd ${BUILD} && \
rm -rf ${BUILD} rm -rf ${BUILD}
# add libjpeg # add libjpeg
# NOTE: this has moved to: http://www.ijg.org/ RUN apk add libjpeg-turbo-dev
# ... can we just use the one in debian instead?
# https://packages.debian.org/search?keywords=libjpeg
RUN apt-get install -y libjpeg-dev
# RUN mkdir -p ${BUILD} && cd ${BUILD} && \
# wget -q https://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v${JPEG_VERSION}.tar.gz && \
# tar xzf jpegsrc.v${JPEG_VERSION}.tar.gz && \
# cd jpeg-${JPEG_VERSION} && \
# ./configure && make -j4 && make install && \
# cp config.log ${OPT}/config.log-jpeg-${JPEG_VERSION} && \
# rm -rf ${BUILD}
## add szip ## add szip
#RUN mkdir -p ${BUILD} && cd ${BUILD} && \ #RUN mkdir -p ${BUILD} && cd ${BUILD} && \
...@@ -64,8 +55,9 @@ RUN mkdir -p ${BUILD} ${OPT}/hdf4 && cd ${BUILD} && \ ...@@ -64,8 +55,9 @@ RUN mkdir -p ${BUILD} ${OPT}/hdf4 && cd ${BUILD} && \
wget -q http://www.hdfgroup.org/ftp/HDF/releases/HDF${HDF4_VERSION}/src/hdf-${HDF4_VERSION}.tar.gz && \ wget -q http://www.hdfgroup.org/ftp/HDF/releases/HDF${HDF4_VERSION}/src/hdf-${HDF4_VERSION}.tar.gz && \
tar xzf hdf-${HDF4_VERSION}.tar.gz && \ tar xzf hdf-${HDF4_VERSION}.tar.gz && \
cd hdf-${HDF4_VERSION} && \ cd hdf-${HDF4_VERSION} && \
CFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing" \ LIBS="-ltirpc" \
CXXFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing" \ CFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing -I/usr/include/tirpc" \
CXXFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing -I/usr/include/tirpc" \
./configure --prefix="${OPT}/hdf4" --disable-netcdf --enable-fortran && make -j4 && make install && \ ./configure --prefix="${OPT}/hdf4" --disable-netcdf --enable-fortran && make -j4 && make install && \
mv ${OPT}/hdf4/bin/ncdump ${OPT}/hdf4/bin/hdfdump && \ mv ${OPT}/hdf4/bin/ncdump ${OPT}/hdf4/bin/hdfdump && \
mv ${OPT}/hdf4/bin/ncgen ${OPT}/hdf4/bin/hdfgen && \ mv ${OPT}/hdf4/bin/ncgen ${OPT}/hdf4/bin/hdfgen && \
...@@ -82,7 +74,10 @@ RUN mkdir -p ${BUILD} ${OPT}/hdf5 && cd ${BUILD} && \ ...@@ -82,7 +74,10 @@ RUN mkdir -p ${BUILD} ${OPT}/hdf5 && cd ${BUILD} && \
wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.bz2 && \ wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.bz2 && \
tar xjf hdf5-${HDF5_VERSION}.tar.bz2 && \ tar xjf hdf5-${HDF5_VERSION}.tar.bz2 && \
cd hdf5-${HDF5_VERSION} && \ cd hdf5-${HDF5_VERSION} && \
./configure --prefix="${OPT}/hdf5" --with-pic --with-zlib="${OPT}/zlib" --enable-cxx --enable-fortran --enable-fortran2003 --with-pthread --with-default-api-version=v18 && make -j4 && make install && \ LIBS="-ltirpc" \
CFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing -I/usr/include/tirpc" \
CXXFLAGS="-fPIC -DHAVE_NETCDF -fno-strict-aliasing -I/usr/include/tirpc" \
./configure --prefix="${OPT}/hdf5" --with-pic --enable-static-exec --enable-cxx --enable-fortran && make -j4 && make install && \
cp config.log ${OPT}/hdf5/config.log-hdf5-${HDF5_VERSION} && \ cp config.log ${OPT}/hdf5/config.log-hdf5-${HDF5_VERSION} && \
rm -rf ${BUILD} rm -rf ${BUILD}
...@@ -123,8 +118,8 @@ RUN mkdir -p ${BUILD} ${OPT}/nco && cd ${BUILD} && \ ...@@ -123,8 +118,8 @@ RUN mkdir -p ${BUILD} ${OPT}/nco && cd ${BUILD} && \
rm -rf ${BUILD} rm -rf ${BUILD}
## add uwglance for verifying data, etc. ## add uwglance for verifying data, etc.
RUN apt-get install -y python-setuptools python-numpy python-scipy python-matplotlib python-mpltoolkits.basemap #RUN apt-get install -y python-setuptools python-numpy python-scipy python-matplotlib python-mpltoolkits.basemap
RUN easy_install -f http://larch.ssec.wisc.edu/cgi-bin/repos.cgi uwglance #RUN easy_install -f http://larch.ssec.wisc.edu/cgi-bin/repos.cgi uwglance
# ## add pyhdf for glance to read hdf4 files # ## add pyhdf for glance to read hdf4 files
# RUN mkdir -p ${BUILD} && cd ${BUILD} && \ # RUN mkdir -p ${BUILD} && cd ${BUILD} && \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment