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: ...@@ -103,6 +103,17 @@ python-3.6-samplers:
- pytest test/core/sampler/sampler_run_test.py - 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 # Tests run at a fixed schedule rather than on push
scheduled-python-3.7: scheduled-python-3.7:
stage: test 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" \ RUN conda update -n base -c defaults conda
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \
date="20190104"
ENV PATH /opt/conda/bin:$PATH ENV conda_env python{python_major_version}{python_minor_version}
# Install backend RUN conda create -n ${{conda_env}} python={python_major_version}.{python_minor_version}
RUN apt-get update --fix-missing \ RUN echo "source activate ${{conda_env}}" > ~/.bashrc
&& apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libgl1-mesa-glx \ ENV PATH /opt/conda/envs/${{conda_env}}/bin:$PATH
dh-autoreconf build-essential libarchive-dev wget curl git libhdf5-serial-dev RUN /bin/bash -c "source activate ${{conda_env}}"
RUN conda info
RUN python --version
# Install python3.7 # Install pymultinest requirements
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O ~/miniconda.sh && \ RUN apt-get update
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ RUN apt-get install -y libblas3 libblas-dev liblapack3 liblapack-dev \
rm ~/miniconda.sh && \ libatlas3-base libatlas-base-dev cmake build-essential gfortran
/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 conda-installable programs # 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 # 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 # Install pip-requirements
RUN pip install future \ RUN pip install --upgrade pip
pycondor>=0.5 \ RUN pip install --upgrade setuptools coverage-badge
configargparse \
flake8 \
mock \
pipenv \
coverage \
pytest-cov \
coverage-badge
# Install documentation requirements # Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# 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)
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 # Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \ RUN git clone https://github.com/PolyChord/PolyChordLite.git \
...@@ -75,4 +52,4 @@ RUN mkdir roq_basis \ ...@@ -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/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_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/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 FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \ LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \ maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
date="20191114"
RUN conda update -n base -c defaults conda RUN conda update -n base -c defaults conda
...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install dependencies and samplers # Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4 RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# 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:
# Install Polychord # Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \ RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3 FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \ LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \ maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
date="20191114"
RUN conda update -n base -c defaults conda RUN conda update -n base -c defaults conda
...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install dependencies and samplers # Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4 RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# 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:
# Install Polychord # Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \ RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3 FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \ LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \ maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
date="20191114"
RUN conda update -n base -c defaults conda RUN conda update -n base -c defaults conda
...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install dependencies and samplers # Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4 RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# 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:
# Install Polychord # Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \ RUN git clone https://github.com/PolyChord/PolyChordLite.git \
......
# This dockerfile is written automatically and should not be modified by hand.
FROM continuumio/miniconda3 FROM continuumio/miniconda3
LABEL name="bilby Base miniconda3" \ LABEL name="bilby Base miniconda3" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>" \ maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
date="20191114"
RUN conda update -n base -c defaults conda RUN conda update -n base -c defaults conda
...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ...@@ -35,13 +36,8 @@ RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install dependencies and samplers # Install dependencies and samplers
RUN pip install corner lalsuite theano healpy cython tables RUN pip install corner lalsuite theano healpy cython tables
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest kombine ultranest dnest4 RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 kombine dnest4
RUN conda install -n ${conda_env} -c conda-forge pymultinest ultranest
# 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:
# Install Polychord # Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \ 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