Skip to content
Snippets Groups Projects
Commit a1c07828 authored by Matthew David Pitkin's avatar Matthew David Pitkin Committed by Moritz Huebner
Browse files

Make Python 3.6+ a specific requirement

parent 98123755
No related branches found
No related tags found
1 merge request!979Make Python 3.6+ a specific requirement
# This dockerfile is written automatically and should not be modified by hand.
FROM containers.ligo.org/docker/base:conda
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
ENV conda_env python35
RUN conda create -n ${conda_env} python=3.5
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 update
RUN apt-get install -y libblas3 libblas-dev liblapack3 liblapack-dev \
libatlas3-base libatlas-base-dev cmake build-essential gfortran
# Install conda-installable programs
RUN conda install -n ${conda_env} -y matplotlib numpy scipy pandas astropy flake8 mock
RUN conda install -n ${conda_env} -c anaconda coverage configargparse future
# Install conda-forge-installable programs
RUN conda install -n ${conda_env} -c conda-forge black ligo-gracedb gwpy lalsuite ligo.skymap pytest-cov deepdish arviz
# Install pip-requirements
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools coverage-badge
# Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4 nessai
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && python setup.py --no-mpi install)
# Install PTMCMCSampler
RUN git clone https://github.com/jellis18/PTMCMCSampler.git \
&& (cd PTMCMCSampler && python setup.py install)
# Add the ROQ data to the image
RUN mkdir roq_basis \
&& cd roq_basis \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/B_linear.npy \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/B_quadratic.npy \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/fnodes_linear.npy \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/fnodes_quadratic.npy \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/params.dat
......@@ -3,7 +3,7 @@ from datetime import date
with open("dockerfile-template", "r") as ff:
template = ff.read()
python_versions = [(3, 5), (3, 6), (3, 7), (3, 8)]
python_versions = [(3, 6), (3, 7), (3, 8)]
today = date.today().strftime("%Y%m%d")
for python_major_version, python_minor_version in python_versions:
......
......@@ -10,7 +10,7 @@ Installation
$ conda install -c conda-forge bilby
Supported python versions: 3.5+.
Supported python versions: 3.6+.
.. tab:: Pip
......@@ -18,7 +18,7 @@ Installation
$ pip install bilby
Supported python versions: 3.5+.
Supported python versions: 3.6+.
This will install all requirements for running :code:`bilby` for general
......
......@@ -5,11 +5,11 @@ import subprocess
import sys
import os
# check that python version is 3.5 or above
# check that python version is 3.6 or above
python_version = sys.version_info
if python_version < (3, 5):
sys.exit("Python < 3.5 is not supported, aborting setup")
print("Confirmed Python version {}.{}.{} >= 3.5.0".format(*python_version[:3]))
if python_version < (3, 6):
sys.exit("Python < 3.6 is not supported, aborting setup")
print("Confirmed Python version {}.{}.{} >= 3.6.0".format(*python_version[:3]))
def write_version_file(version):
......@@ -91,7 +91,7 @@ setup(name='bilby',
'bilby.gw.detector': ['noise_curves/*.txt', 'detectors/*'],
'bilby.gw.eos': ['eos_tables/*.dat'],
'bilby': [version_file]},
python_requires='>=3.5',
python_requires='>=3.6',
install_requires=get_requirements(),
entry_points={'console_scripts':
['bilby_plot=cli_bilby.plot_multiple_posteriors:main',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment