Skip to content
Snippets Groups Projects
Commit d0eda904 authored by Colm Talbot's avatar Colm Talbot Committed by Moritz Huebner
Browse files

add auto generated dockerfiles

parent d858a275
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,17 @@ python-3.6-samplers:
- pytest test/core/sampler/sampler_run_test.py
# Test containers are up to date
containers:
stage: test
image: bilbydev/v2-dockerfile-test-suite-python37
script:
- cd containers
- python write_dockerfiles.py
# Fail if differences exist. If this fails, you may need to run
# write_dockerfiles.py and commit the changes.
- git diff --exit-code
# Tests run at a fixed schedule rather than on push
scheduled-python-3.7:
stage: test
......
FROM bilbydev/bilby-test-suite-python37
LABEL name="bilby" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20190130"
RUN pip install bilby
FROM ubuntu:18.04
LABEL name="bilby Base Enterprise Linux 7" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20190104"
ENV PATH /opt/conda/bin:$PATH
# Install backend
RUN apt-get update --fix-missing \
&& apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libgl1-mesa-glx \
dh-autoreconf build-essential libarchive-dev wget curl git libhdf5-serial-dev
# Install python2.7
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda2-4.5.11-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
# Install conda-installable programs
RUN conda install -y numpy scipy matplotlib pandas==0.23
RUN conda install -c conda-forge deepdish arviz
# Install requirements
RUN pip install --upgrade pip \
&& pip install --upgrade setuptools \
&& pip install future \
pycondor>=0.5 \
configargparse \
flake8 \
mock \
pipenv \
coverage \
pytest-cov \
coverage-badge
# Install additional bilby requirements
RUN pip install corner lalsuite astropy gwpy theano tables
# Install samplers
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4
# Install pymultinest requirements
RUN apt-get install -y libblas3 libblas-dev liblapack3 liblapack-dev \
libatlas3-base libatlas-base-dev cmake build-essential gfortran
# Install pymultinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.11_CMake/multinest && mkdir build && cd build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.11_CMake/multinest/lib:
# 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 \
FROM ubuntu:18.04
FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
LABEL name="bilby Base Enterprise Linux 7" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20190104"
RUN conda update -n base -c defaults conda
ENV PATH /opt/conda/bin:$PATH
ENV conda_env python{python_major_version}{python_minor_version}
# Install backend
RUN apt-get update --fix-missing \
&& apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libgl1-mesa-glx \
dh-autoreconf build-essential libarchive-dev wget curl git libhdf5-serial-dev
RUN conda create -n ${{conda_env}} python={python_major_version}.{python_minor_version}
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 python3.7
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
# Update pip and setuptools
RUN pip install --upgrade pip \
&& LC_ALL=C pip install --upgrade setuptools
# 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 -y numpy scipy matplotlib pandas
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 -c conda-forge deepdish arviz
RUN conda install -n ${{conda_env}} -c conda-forge black ligo-gracedb gwpy lalsuite ligo.skymap pytest-cov deepdish arviz
# Install requirements
RUN pip install future \
pycondor>=0.5 \
configargparse \
flake8 \
mock \
pipenv \
coverage \
pytest-cov \
coverage-badge
# 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
# Install additional bilby requirements
RUN pip install corner lalsuite astropy gwpy theano healpy tables
# Install samplers
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4
# Install pymultinest requirements
RUN apt-get install -y libblas3 libblas-dev liblapack3 liblapack-dev \
libatlas3-base libatlas-base-dev cmake build-essential gfortran
# Install pymultinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.11_CMake/multinest && mkdir build && cd build && cmake .. && make)
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.11_CMake/multinest/lib:
# Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${{conda_env}} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......@@ -75,4 +52,4 @@ RUN mkdir roq_basis \
&& 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 \
&& wget https://git.ligo.org/lscsoft/ROQ_data/raw/master/IMRPhenomPv2/4s/params.dat
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20191114"
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
......@@ -35,13 +36,8 @@ 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 pymultinest kombine ultranest dnest4
# Install multinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.12_CMake/multinest && mkdir build && cd build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.12_CMake/multinest/lib:
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20191114"
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
......@@ -35,13 +36,8 @@ 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 pymultinest kombine ultranest dnest4
# Install multinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.12_CMake/multinest && mkdir build && cd build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.12_CMake/multinest/lib:
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20191114"
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
......@@ -35,13 +36,8 @@ 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 pymultinest kombine ultranest dnest4
# Install multinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.12_CMake/multinest && mkdir build && cd build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.12_CMake/multinest/lib:
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20191114"
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
......@@ -35,13 +36,8 @@ 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 pymultinest kombine ultranest dnest4
# Install multinest
RUN git clone https://github.com/farhanferoz/MultiNest.git \
&& (cd MultiNest/MultiNest_v3.12_CMake/multinest && mkdir build && cd build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/MultiNest_v3.12_CMake/multinest/lib:
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
from datetime import date
with open("dockerfile-template", "r") as ff:
template = ff.read()
python_versions = [(3, 5), (3, 6), (3, 7), (3, 8)]
today = date.today().strftime("%Y%m%d")
for python_major_version, python_minor_version in python_versions:
with open(
"v2-dockerfile-test-suite-python"
f"{python_major_version}{python_minor_version}",
"w"
) as ff:
ff.write(
"# This dockerfile is written automatically and should not be "
"modified by hand.\n\n"
)
ff.write(template.format(
date=today,
python_major_version=python_major_version,
python_minor_version=python_minor_version
))
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