Skip to content
Snippets Groups Projects
Commit c013fc4e authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Add casacore to docker build

parent d16d455c
No related branches found
No related tags found
1 merge request!225Add casacore to docker build
Pipeline #101731 failed
......@@ -9,8 +9,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
bison \
build-essential \
casacore-data \
casacore-dev \
cmake \
flex \
gfortran \
......@@ -39,14 +37,34 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
python3-numpy \
python3-pip \
wcslib-dev \
wget && \
mkdir -p /src
wget
WORKDIR /src
# Do not use `pip` from the Debian repository, but fetch it from PyPA.
# This way, we are sure that the latest versions of `pip`, `setuptools`, and
# `wheel` are installed in /usr/local, the only directory we're going to copy
# over to the next build stage.
RUN wget -q https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py
# Install required python packages
RUN python3 -m pip install --no-cache-dir --upgrade \
nodejs-wheel \
toil[cwl]
# Build portable binaries by default
ARG TARGET_CPU=haswell
ARG CASACORE_COMMIT=master
RUN git clone --no-checkout \
https://github.com/casacore/casacore.git && \
mkdir casacore/build && \
cd casacore && git checkout ${CASACORE_COMMIT} && \
cd build && \
cmake .. -DTARGET_CPU=${TARGET_CPU} && \
make install -j`nproc`
ARG LOFARSTMAN_COMMIT=main
RUN git clone --no-checkout \
https://github.com/lofar-astron/LofarStMan && \
......@@ -132,17 +150,11 @@ RUN git clone --no-checkout \
cmake .. -DTARGET_CPU=${TARGET_CPU} && \
make install -j`nproc`
# Do not use `pip` from the Debian repository, but fetch it from PyPA.
# This way, we are sure that the latest versions of `pip`, `setuptools`, and
# `wheel` are installed in /usr/local, the only directory we're going to copy
# over to the next build stage.
RUN wget -q https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py
# Install required python packages
RUN python3 -m pip install --no-cache-dir --upgrade \
nodejs-wheel \
toil[cwl]
ARG PYTHONCASACORE_COMMIT=master
RUN git clone --no-checkout \
https://github.com/casacore/python-casacore.git && \
cd python-casacore && git checkout ${PYTHONCASACORE_COMMIT} && \
python3 -m pip install --verbose .
# Install current version of LINC. By adding this to the base image
# we can speed up the build of the final image, because all of LINC's
......@@ -153,7 +165,7 @@ COPY . linc
# Note: LINC_VERSION should be provided as build argument
ARG LINC_VERSION=0.0.0
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LINC=${LINC_VERSION} \
python3 -m pip install --no-cache-dir --upgrade ./linc
python3 -m pip install --upgrade ./linc
#---------------------------------------------------------------------------
......@@ -168,18 +180,22 @@ RUN chmod +rx /usr/local/bin/*
SHELL ["/bin/bash", "-c"]
# Set default versions. Can be overridden from the command-line
ARG CASACORE_COMMIT=master
ARG LOFARSTMAN_COMMIT=main
ARG DYSCO_COMMIT=master
ARG SAGECAL_COMMIT=master
ARG IDG_COMMIT=master
ARG AOFLAGGER_COMMIT=master
ARG LOFARBEAM_COMMIT=master
ARG EVERYBEAM_COMMIT=master
ARG SAGECAL_COMMIT=master
ARG DP3_COMMIT=master
ARG WSCLEAN_COMMIT=master
ARG PYTHONCASACORE_COMMIT=master
# Add version information to the metadata of the image
LABEL \
nl.astron.nl.linc.casacore.version=${CASACORE_COMMIT} \
nl.astron.nl.linc.python-casacore.version=${PYTHONCASACORE_COMMIT} \
nl.astron.linc.lofarstman.version=${LOFARSTMAN_COMMIT} \
nl.astron.linc.dysco.version=${DYSCO_COMMIT} \
nl.astron.linc.sagecal.version=${SAGECAL_COMMIT} \
......@@ -194,7 +210,6 @@ LABEL \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
casacore-tools \
gdb \
git \
libatkmm-1.6-1v5 \
......@@ -203,13 +218,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libboost-program-options1.74.0 \
libboost-python1.74.0 \
libcairomm-1.0-1v5 \
libcasa-casa6 \
libcasa-fits6 \
libcasa-measures6 \
libcasa-ms6 \
libcasa-python3-6 \
libcasa-scimath6 \
libcasa-tables6 \
libcfitsio9 \
libfftw3-double3 \
libfftw3-single3 \
......@@ -229,7 +237,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsigc++-2.0-0v5 \
libstdc++6 \
python3 \
python3-casacore \
python3-distutils \
rsync \
wget && \
......@@ -238,11 +245,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
# Install WSRT Measures (extra casacore data)
# Note: The file on the ftp site is updated daily. When warnings regarding leap
# seconds appear, ignore them or regenerate the docker image.
RUN wget -q -O /WSRT_Measures.ztar \
ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar && \
cd /var/lib/casacore/data && \
tar xfz /WSRT_Measures.ztar && \
rm /WSRT_Measures.ztar
RUN mkdir -p /usr/local/share/casacore/data && \
wget -qO - ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar | \
tar -C /usr/local/share/casacore/data -xzf -
# Try to run the compiled tools to make sure they run without
# a problem (e.g. no missing libraries).
......
#!/bin/sh
git ls-remote https://github.com/lofar-astron/LofarStMan HEAD | awk '{ print "LOFARSTMAN_COMMIT="$1 }'
git ls-remote https://github.com/aroffringa/dysco.git HEAD | awk '{ print "DYSCO_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/idg.git HEAD | awk '{ print "IDG_COMMIT="$1 }'
git ls-remote https://gitlab.com/aroffringa/aoflagger.git HEAD | awk '{ print "AOFLAGGER_COMMIT="$1 }'
git ls-remote https://github.com/nlesc-dirac/sagecal HEAD | awk '{ print "SAGECAL_COMMIT="$1 }'
git ls-remote https://github.com/lofar-astron/LOFARBeam.git HEAD | awk '{ print "LOFARBEAM_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/EveryBeam.git HEAD | awk '{ print "EVERYBEAM_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/DP3.git HEAD | awk '{ print "DP3_COMMIT="$1 }'
git ls-remote https://gitlab.com/aroffringa/wsclean.git HEAD | awk '{ print "WSCLEAN_COMMIT="$1 }'
git ls-remote https://github.com/casacore/casacore.git v3.6.1 | awk '{ print "CASACORE_COMMIT="$1 }'
git ls-remote https://github.com/lofar-astron/LofarStMan HEAD | awk '{ print "LOFARSTMAN_COMMIT="$1 }'
git ls-remote https://github.com/aroffringa/dysco.git HEAD | awk '{ print "DYSCO_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/idg.git HEAD | awk '{ print "IDG_COMMIT="$1 }'
git ls-remote https://gitlab.com/aroffringa/aoflagger.git HEAD | awk '{ print "AOFLAGGER_COMMIT="$1 }'
git ls-remote https://github.com/lofar-astron/LOFARBeam.git HEAD | awk '{ print "LOFARBEAM_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/EveryBeam.git HEAD | awk '{ print "EVERYBEAM_COMMIT="$1 }'
git ls-remote https://github.com/nlesc-dirac/sagecal HEAD | awk '{ print "SAGECAL_COMMIT="$1 }'
git ls-remote https://git.astron.nl/RD/DP3.git HEAD | awk '{ print "DP3_COMMIT="$1 }'
git ls-remote https://gitlab.com/aroffringa/wsclean.git HEAD | awk '{ print "WSCLEAN_COMMIT="$1 }'
git ls-remote https://github.com/casacore/python-casacore.git v3.6.1 | awk '{ print "PYTHONCASACORE_COMMIT="$1 }'
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