Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Bearson
docker-science-stack
Commits
361dfb71
Commit
361dfb71
authored
Apr 16, 2019
by
Nick Bearson
Browse files
initial changes to use alpine & musl; currently builds up through hdf5
parent
9933f15a
Pipeline
#6017
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
361dfb71
# This image creates a common scientific build environment that includes:
# gfortran, hdf4, hdf5, netcdf4
FROM
gcc
:latest
FROM
alpine
:latest
ENV
BUILD /build
ENV
OPT /opt
...
...
@@ -11,18 +11,19 @@ ENV ZLIB_VERSION 1.2.11
ENV
JPEG_VERSION 6b
ENV
SZIP_VERSION 2.1
ENV
HDF4_VERSION 4.2.12
ENV
HDF5_VERSION 1.10.
4
ENV
NC4F_VERSION 4.4.
4
ENV
NC4C_VERSION 4.
4
.1
ENV
HDF5_VERSION 1.10.
5
ENV
NC4F_VERSION 4.4.
5
ENV
NC4C_VERSION 4.
6
.1
ENV
NCO_VERSION 4.6.1
ENV
PYHDF_VERSION 0.9.0
ENV
NETCDFPY_VERSION 1.2.4rel
# grab some packages we need
RUN
apt-get update
&&
apt-get
install
-y
byacc bison diffutils flex make
# grab some CORE packages we need
# 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"
RUN
ap
t-get
install
-y
vim less tree
screen
unzip cvs subversion git gdb valgrind
RUN
ap
k add
vim less tree unzip cvs subversion git gdb valgrind
# this is our install dir for everything non-core
RUN
mkdir
-p
${
OPT
}
...
...
@@ -38,17 +39,7 @@ RUN mkdir -p ${BUILD} && cd ${BUILD} && \
rm
-rf
${
BUILD
}
# add libjpeg
# NOTE: this has moved to: http://www.ijg.org/
# ... 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}
RUN
apk add libjpeg-turbo-dev
## add szip
#RUN mkdir -p ${BUILD} && 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
&&
\
tar
xzf hdf-
${
HDF4_VERSION
}
.tar.gz
&&
\
cd
hdf-
${
HDF4_VERSION
}
&&
\
CFLAGS
=
"-fPIC -DHAVE_NETCDF -fno-strict-aliasing"
\
CXXFLAGS
=
"-fPIC -DHAVE_NETCDF -fno-strict-aliasing"
\
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
}
/hdf4"
--disable-netcdf
--enable-fortran
&&
make
-j4
&&
make
install
&&
\
mv
${
OPT
}
/hdf4/bin/ncdump
${
OPT
}
/hdf4/bin/hdfdump
&&
\
mv
${
OPT
}
/hdf4/bin/ncgen
${
OPT
}
/hdf4/bin/hdfgen
&&
\
...
...
@@ -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
&&
\
tar
xjf hdf5-
${
HDF5_VERSION
}
.tar.bz2
&&
\
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
}
&&
\
rm
-rf
${
BUILD
}
...
...
@@ -123,8 +118,8 @@ RUN mkdir -p ${BUILD} ${OPT}/nco && cd ${BUILD} && \
rm
-rf
${
BUILD
}
## add uwglance for verifying data, etc.
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 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
# ## add pyhdf for glance to read hdf4 files
# RUN mkdir -p ${BUILD} && cd ${BUILD} && \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment