Skip to content
Snippets Groups Projects
Commit 1311b326 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Improvements to the containers

parent c3972e15
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,10 @@ stages:
- deploy
# test example on python 2
python-2:
python-2.7:
stage: test
image: bilbydev/test-suite-py2
image: bilbydev/bilby-test-suite-python27
before_script:
# Source the .bashrc for MultiNest
- source /root/.bashrc
# Install the dependencies specified in the Pipfile
- pipenv install --two --python=/opt/conda/bin/python2 --system --deploy
script:
......@@ -28,12 +26,10 @@ python-2:
- pytest --ignore=test/utils_py3_test.py
# test example on python 3
python-3:
python-3.7:
stage: test
image: bilbydev/test-suite-py3
image: bilbydev/bilby-test-suite-python37
before_script:
# Source the .bashrc for MultiNest
- source /root/.bashrc
# Install the dependencies specified in the Pipfile
- pipenv install --three --python=/opt/conda/bin/python --system --deploy
script:
......@@ -49,7 +45,6 @@ python-3:
# Make the documentation
- cd docs
- conda install -y make
- make clean
- make html
......@@ -62,8 +57,8 @@ python-3:
pages:
stage: deploy
dependencies:
- python-3
- python-2
- python-3.7
- python-2.7
script:
- mkdir public/
- mv htmlcov/ public/
......
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>=1.9 scipy>=0.16 matplotlib>=2.0 pandas
RUN conda install -c conda-forge deepdish
# 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
# Install samplers
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest
# 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/JohannesBuchner/MultiNest \
&& (cd MultiNest/build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/lib:
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && make pypolychord MPI= && python setup.py install)
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 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
# Install conda-installable programs
RUN conda install -y numpy>=1.9 scipy>=0.16 matplotlib>=2.0 pandas
RUN conda install -c conda-forge deepdish
# 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 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
# Install samplers
RUN pip install cpnest dynesty emcee nestle ptemcee pymc3 pymultinest
# 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/JohannesBuchner/MultiNest \
&& (cd MultiNest/build && cmake .. && make)
ENV LD_LIBRARY_PATH $HOME/MultiNest/lib:
# Install Polychord
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && make pypolychord MPI= && python setup.py install)
Bootstrap: docker
From: bilbydev/bilby-test-suite-python37
%help
A singularity container for running bilby scripts. To use, simply execute the
container, providing the bilby_script and any additional arguments. E.g.,
./name_of_this_container.simg run_script.py
%post
pip install bilby==0.3.3
%runscript
exec /opt/conda/bin/python "$@"
[flake8]
exclude = .git,docs,build,dist,test,*__init__.py
max-line-length = 160
ignore = E129
ignore = E129 W504 W605
[tool:pytest]
addopts =
......
Bootstrap: debootstrap
OSVersion: bionic
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
%help
A singularity container for running bilby scripts. Built from Ubuntu 18.04,
this contains all the software to run bilby. Available samplers are "dynesty"
and "nestle". Other samplers will be added in the future.
%post
apt-get update && apt-get install -y --no-install-recommends apt-utils
apt-get install -y curl
apt-get install -y gcc
apt-get install -y libgl1-mesa-glx
apt-get install -y libdpkg-perl
apt-get install -y python3
apt-get install -y python3-dev
apt-get install -y python3-distutils
curl -sS https://bootstrap.pypa.io/get-pip.py | python3
pip install --upgrade pip
pip install future
pip install corner
pip install numpy>=1.9
pip install matplotlib>=2.0
pip install scipy>=0.16
pip install pandas
pip install deepdish
pip install mock
pip install dynesty
pip install nestle
pip install astropy
pip install lalsuite
pip install urllib3
pip install gwpy
pip install bilby==0.3.3
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