Skip to content
Snippets Groups Projects
Commit e841995b authored by Colm Talbot's avatar Colm Talbot
Browse files

CI: Various CI fixes

parent c965f842
No related branches found
No related tags found
1 merge request!1300CI: Various CI fixes
Pipeline #572802 failed
......@@ -258,7 +258,8 @@ pages:
script:
- cd containers
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --tag v3-bilby-$PYVERSION - < v3-dockerfile-test-suite-$PYVERSION
- cp v3-dockerfile-test-suite-$PYVERSION Dockerfile
- docker build --tag v3-bilby-$PYVERSION .
- docker image tag v3-bilby-$PYVERSION containers.ligo.org/lscsoft/bilby/v2-bilby-$PYVERSION:latest
- docker image push containers.ligo.org/lscsoft/bilby/v2-bilby-$PYVERSION:latest
......
......@@ -72,6 +72,7 @@ Roberto Cotesta
Rory Smith
S. H. Oh
Sacha Husa
Samson Leong
Scott Coughlin
Serguei Ossokine
Shanika Galaudage
......
......@@ -423,7 +423,8 @@ def read_frame_file(file_name, start_time, end_time, resample=None, channel=None
if loaded:
if resample and (strain.sample_rate.value != resample):
return strain.resample(resample)
strain = strain.resample(resample)
return strain
else:
logger.warning('No data loaded.')
return None
......
FROM containers.ligo.org/docker/base:conda
LABEL name="bilby CI testing" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
maintainer="Gregory Ashton <gregory.ashton@ligo.org>, Colm Talbot <colm.talbot@ligo.org>"
COPY env-template.yml env.yml
RUN echo " - python=={python_major_version}.{python_minor_version}" >> env.yml
ENV conda_env python{python_major_version}{python_minor_version}
RUN conda create -n ${{conda_env}} python={python_major_version}.{python_minor_version}
RUN mamba env create -f env.yml -n ${{conda_env}}
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 mamba info
RUN python --version
# Install conda-installable programs
RUN conda install -n ${{conda_env}} -y matplotlib numpy scipy pandas astropy flake8
RUN conda install -n ${{conda_env}} -c anaconda coverage configargparse future dill
RUN conda install -n ${{conda_env}} -c conda-forge black pytest-cov deepdish arviz
# Install pip-requirements
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools coverage-badge parameterized
# Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install testing requirements
RUN conda install -n ${{conda_env}} -c conda-forge scikit-image celerite george
# Install dependencies and samplers
RUN pip install corner healpy cython tables
RUN conda install -n ${{conda_env}} {conda_samplers} -c conda-forge -c pytorch
# Install Polychord
RUN apt-get update --allow-releaseinfo-change
RUN apt-get install -y build-essential
......@@ -43,10 +24,6 @@ RUN apt-get install -y gfortran
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && python setup.py --no-mpi install)
# Install GW packages
RUN conda install -n ${{conda_env}} -c conda-forge python-lalsimulation bilby.cython pyseobnr
RUN pip install ligo-gracedb gwpy ligo.skymap
# Add the ROQ data to the image
RUN mkdir roq_basis \
&& cd roq_basis \
......
# This is a template yaml file for the test image
# The python version should be added before creating the env
channels:
- conda-forge
- defaults
dependencies:
- pip
- setuptools
- matplotlib
- numpy
- scipy
- pandas
- astropy
- flake8
- anaconda
- coverage
- configargparse
- future
- dill
- black
- pytest-cov
- arviz
- parameterized
- scikit-image
- celerite
- george
- corner
- healpy
- cython
- pytables
- pytorch
- python-lalsimulation
- bilby.cython
- pyseobnr
- ligo-gracedb
- gwpy
- ligo.skymap
- sphinx
- numpydoc
- nbsphinx
- sphinx_rtd_theme
- sphinx-tabs
- dynesty
- emcee
- nestle
- ptemcee
- pymultinest
- ultranest
- cpnest
- kombine
- dnest4
- zeus-mcmc
- pytorch
- pymc>=5.9
- nessai
- ptmcmcsampler
- jaxlib>=0.4
- jax>=0.4
- numba>0.53.1
- pip:
- autodoc
......@@ -2,38 +2,19 @@
FROM containers.ligo.org/docker/base:conda
LABEL name="bilby CI testing" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
maintainer="Gregory Ashton <gregory.ashton@ligo.org>, Colm Talbot <colm.talbot@ligo.org>"
COPY env-template.yml env.yml
RUN echo " - python==3.10" >> env.yml
ENV conda_env python310
RUN conda create -n ${conda_env} python=3.10
RUN mamba env create -f env.yml -n ${conda_env}
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 mamba info
RUN python --version
# Install conda-installable programs
RUN conda install -n ${conda_env} -y matplotlib numpy scipy pandas astropy flake8
RUN conda install -n ${conda_env} -c anaconda coverage configargparse future dill
RUN conda install -n ${conda_env} -c conda-forge black pytest-cov deepdish arviz
# Install pip-requirements
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools coverage-badge parameterized
# Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install testing requirements
RUN conda install -n ${conda_env} -c conda-forge scikit-image celerite george
# Install dependencies and samplers
RUN pip install corner healpy cython tables
RUN conda install -n ${conda_env} dynesty emcee nestle ptemcee pymultinest ultranest cpnest kombine dnest4 zeus-mcmc pytorch 'pymc>=4' nessai ptmcmcsampler -c conda-forge -c pytorch
# Install Polychord
RUN apt-get update --allow-releaseinfo-change
RUN apt-get install -y build-essential
......@@ -45,10 +26,6 @@ RUN apt-get install -y gfortran
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && python setup.py --no-mpi install)
# Install GW packages
RUN conda install -n ${conda_env} -c conda-forge python-lalsimulation bilby.cython pyseobnr
RUN pip install ligo-gracedb gwpy ligo.skymap
# Add the ROQ data to the image
RUN mkdir roq_basis \
&& cd roq_basis \
......
......@@ -2,38 +2,19 @@
FROM containers.ligo.org/docker/base:conda
LABEL name="bilby CI testing" \
maintainer="Gregory Ashton <gregory.ashton@ligo.org>"
RUN conda update -n base -c defaults conda
maintainer="Gregory Ashton <gregory.ashton@ligo.org>, Colm Talbot <colm.talbot@ligo.org>"
COPY env-template.yml env.yml
RUN echo " - python==3.9" >> env.yml
ENV conda_env python39
RUN conda create -n ${conda_env} python=3.9
RUN mamba env create -f env.yml -n ${conda_env}
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 mamba info
RUN python --version
# Install conda-installable programs
RUN conda install -n ${conda_env} -y matplotlib numpy scipy pandas astropy flake8
RUN conda install -n ${conda_env} -c anaconda coverage configargparse future dill
RUN conda install -n ${conda_env} -c conda-forge black pytest-cov deepdish arviz
# Install pip-requirements
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools coverage-badge parameterized
# Install documentation requirements
RUN pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc
# Install testing requirements
RUN conda install -n ${conda_env} -c conda-forge scikit-image celerite george
# Install dependencies and samplers
RUN pip install corner healpy cython tables
RUN conda install -n ${conda_env} dynesty emcee nestle ptemcee pymultinest ultranest cpnest kombine dnest4 zeus-mcmc pytorch 'pymc>=4' nessai ptmcmcsampler -c conda-forge -c pytorch
# Install Polychord
RUN apt-get update --allow-releaseinfo-change
RUN apt-get install -y build-essential
......@@ -45,10 +26,6 @@ RUN apt-get install -y gfortran
RUN git clone https://github.com/PolyChord/PolyChordLite.git \
&& (cd PolyChordLite && python setup.py --no-mpi install)
# Install GW packages
RUN conda install -n ${conda_env} -c conda-forge python-lalsimulation bilby.cython pyseobnr
RUN pip install ligo-gracedb gwpy ligo.skymap
# Add the ROQ data to the image
RUN mkdir roq_basis \
&& cd roq_basis \
......
......@@ -6,12 +6,6 @@ with open("dockerfile-template", "r") as ff:
python_versions = [(3, 9), (3, 10)]
today = date.today().strftime("%Y%m%d")
samplers = [
"dynesty", "emcee", "nestle", "ptemcee", "pymultinest", "ultranest",
"cpnest", "kombine", "dnest4", "zeus-mcmc",
"pytorch", "'pymc>=4'", "nessai", "ptmcmcsampler",
]
for python_major_version, python_minor_version in python_versions:
key = f"python{python_major_version}{python_minor_version}"
with open(
......@@ -26,5 +20,4 @@ for python_major_version, python_minor_version in python_versions:
date=today,
python_major_version=python_major_version,
python_minor_version=python_minor_version,
conda_samplers=" ".join(samplers)
))
......@@ -864,8 +864,8 @@ class TestEquationOfStateConversions(unittest.TestCase):
self.mass_2_source_polytrope[i],
0
)
self.assertAlmostEqual(self.lambda_1_polytrope[i], lambda_1, places=3)
self.assertAlmostEqual(self.lambda_2_polytrope[i], lambda_2, places=3)
self.assertAlmostEqual(self.lambda_1_polytrope[i], lambda_1, places=2)
self.assertAlmostEqual(self.lambda_2_polytrope[i], lambda_2, places=1)
self.assertAlmostEqual(self.eos_check_polytrope[i], eos_check)
......
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