FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
    apt-get install -y \
    git \
    cmake \
    build-essential \
    g++-10 \
    pkg-config \
    casacore-data casacore-dev \
    libblas-dev liblapack-dev \
    python3 \
    libpython3-dev \
    libboost-date-time-dev libboost-test-dev \
    libboost-program-options-dev libboost-system-dev libboost-filesystem-dev \
    libcfitsio-dev \
    libfftw3-dev \
    libgsl-dev \
    libhdf5-dev \
    libopenmpi-dev \
    pkg-config \
    python3-dev python3-numpy \
    python3-sphinx \
    python3-pip \
    wget && \
  pip3 install pytest

# Note that in some containers we use the apt-get version of pytest and
# in some we use pip. This is on purpose, to test both ways.

ADD . /src
WORKDIR /src

ENV CC /usr/bin/gcc-10
ENV CXX /usr/bin/g++-10

RUN \
  mkdir /build && \
  cd /build && \
  cmake ../src && \
  make -j`nproc` && \
  make install && \
  wsclean --version
