Public Repository

Last pushed: 2 years ago
Short Description
Base image for Geoscience IPython labs deployment (University of Sydney)
Full Description

Base image

Based upon debian:jessie with updated (from the apt-get versions) builds of:

  • matplotlib
  • numpy
  • basemap
  • spicy
  • vtk
  • hdf5
  • netcdf4
  • jupyter

Also installs tini.

Dockerfile

# Pull base image.
FROM debian:jessie

MAINTAINER Tristan Salles

## the update is fine but very slow ... keep it separated so it doesn't
## get run again and break the cache. The later parts of this build
## may be sensitive to later versions being picked up in the install phase.

RUN apt-get update -y ;

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --fix-missing \
        bash-completion \
        build-essential

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --fix-missing \
        git \
        python \
        python-dev \
        python-pip \
        ruby-full \
        ssh \
        curl \
        libcurl3 \
        libcurl3-dev \
        php5-curl \
        rsync \
        vim \
        less \
        zip \
        gfortran \
        subversion \
        unzip \
        wget

## These are for the full python - scipy stack

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    libopenblas-dev \
    liblapack-dev \
    libscalapack-mpi-dev \
    cython \
    libfreetype6-dev \
    python-numpy \
    python-scipy \
    python-matplotlib \
    python-pandas \
    python-shapely \
    python-sympy \
    python-nose \
    pkg-config \
    python-mpltoolkits.basemap

# Better to build the latest versions than use the old apt-gotten ones
# I'm putting this here as it takes time and ought to be cached before the
# more ephemeral parts of this image.

RUN pip install --upgrade pip
RUN pip install matplotlib numpy scipy --upgrade

# These ones are to install properly netcdf-4
RUN cd /usr/local && \
    wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.8.tar.gz && \
    tar -xf zlib-1.2.8.tar.gz && \
    cd zlib-1.2.8 && \
    ./configure && \
    make && \
    make install

RUN cd /usr/local && \
    wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.13.tar.gz && \
    tar -xf hdf5-1.8.13.tar.gz && \
    cd hdf5-1.8.13 && \
    ./configure --enable-shared --enable-hl --prefix=/usr/local --enable-fortran  && \
    make && \
    make install

RUN cd /usr/local && \
    wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.3.tar.gz && \
    tar -xf netcdf-4.1.3.tar.gz && \
    cd netcdf-4.1.3 && \
    CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-separate-fortran --enable-netcdf-4 --enable-shared --enable-dap --prefix=/usr/local && \
    make && \
    make install

RUN ldconfig && \
    git clone https://github.com/Unidata/netcdf4-python.git && \
    cd netcdf4-python && \
    python setup.py build && \
    python setup.py install

RUN git clone https://github.com/jakevdp/JSAnimation.git && \
    cd JSAnimation && \
    python setup.py install

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    python-vtk

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    texlive-latex-base \
    texlive-latex-recommended \
    texlive-latex-extra \
    texlive-fonts-recommended \
    pandoc

RUN pip install \
    pygments \
    sphinx \
    h5py \
    runipy \
    ipython \
    jupyter

# Need to do a ruby installation for the web site builder

RUN gem install bundler

# Add Tini

ENV TINI_VERSION v0.8.4
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN chmod +x /usr/local/bin/tini

RUN ls -l /
Docker Pull Command
Owner
tristansalles

Comments (0)