# Dockerfile for CWInPy testing with Python 3.7 - based on equivalent files for bilby

FROM containers.ligo.org/docker/base:conda
LABEL name="CWInPy Base miniconda3" \
maintainer="Matthew Pitkin <matthew.pitkin@ligo.org>"

RUN conda update -n base -c defaults conda

ENV conda_env python37

RUN conda create -n ${conda_env} python=3.7
RUN echo "source activate ${conda_env}" > ~/.bashrc
ENV PATH /opt/conda/envs/${conda_env}/bin:$PATH
RUN /bin/bash -c "source activate ${conda_env}"
RUN conda info
RUN python --version

# Install pymultinest requirements
RUN apt-get -qq update
RUN apt-get install -y --no-install-recommends libblas3 libblas-dev liblapack3 \
liblapack-dev libatlas3-base libatlas-base-dev cmake build-essential gfortran \
texlive texlive-latex-extra dvipng libgslcblas0 libgsl-dev

# Install conda-installable programs
RUN conda install -n ${conda_env} -y numpy matplotlib scipy astropy
RUN conda install -n ${conda_env} -c anaconda coverage configargparse future
RUN conda install -n ${conda_env} -c numba numba

# Install conda-forge-installable programs
RUN conda install -n ${conda_env} -c conda-forge black gwpy lalsuite bilby bilby_pipe lintegrate">0.1.6" pycondor gwosc dynesty psrqpy

# Install pip-requirements
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools codecov pytest-coverage pytest-cov pytest-runner coverage-badge pytest_socket

RUN pip install pyerfa

# Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc sphinxcontrib-images recommonmark pydata-sphinx-theme sphinxcontrib-napoleon
