Skip to content
Snippets Groups Projects
Commit a3ec4741 authored by Mick Veldhuis's avatar Mick Veldhuis
Browse files

Merge branch 'dockerfile-allow-specific-versions' into 'main'

Add software version arguments to Dockerfile

See merge request !15
parents f7e44a1c 5ca0910c
No related branches found
No related tags found
1 merge request!15Add software version arguments to Dockerfile
Checking pipeline status
......@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
# Prepare the environment for installing the Rapthor source dependencies.
WORKDIR /src
RUN git config --global alias.shallow-clone "!git clone --depth 1 --recurse-submodules --shallow-submodules"
# By default, build non-portable code, for the oldest CPU that supports AVX2
ARG PORTABLE=FALSE
......@@ -64,7 +63,9 @@ wget -qO - https://www.astron.nl/iers/WSRT_Measures.ztar | \
tar -C /usr/local/share/casacore/data -xzf -
# Install casacore
RUN git shallow-clone https://github.com/casacore/casacore.git
ARG CASACORE_COMMIT=master
RUN git clone --no-checkout https://github.com/casacore/casacore.git
RUN git -C casacore checkout ${CASACORE_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \
......@@ -75,7 +76,9 @@ RUN cmake \
RUN ninja -C /src/casacore/build install
# Install LofarStMan
RUN git shallow-clone https://github.com/lofar-astron/LofarStMan
ARG LOFARSTMAN_COMMIT=main
RUN git clone --no-checkout https://github.com/lofar-astron/LofarStMan.git
RUN git -C LofarStMan checkout ${LOFARSTMAN_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \
......@@ -88,7 +91,9 @@ RUN ninja -C /src/LofarStMan/build install
# Install EveryBeam
# Do not compile python bindings, they will interfere with the ones in the
# binary wheel on PyPI.
RUN git shallow-clone https://git.astron.nl/RD/EveryBeam.git
ARG EVERYBEAM_COMMIT=master
RUN git clone --no-checkout https://git.astron.nl/RD/EveryBeam.git
RUN git -C EveryBeam checkout ${EVERYBEAM_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_WITH_PYTHON=OFF \
......@@ -101,7 +106,9 @@ RUN cmake \
RUN ninja -C /src/EveryBeam/build install
# Install AOFlagger
RUN git shallow-clone https://gitlab.com/aroffringa/aoflagger.git
ARG AOFLAGGER_COMMIT=master
RUN git clone --no-checkout https://gitlab.com/aroffringa/aoflagger.git
RUN git -C aoflagger checkout ${AOFLAGGER_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \
......@@ -112,7 +119,9 @@ RUN cmake \
RUN ninja -C /src/aoflagger/build install
# Install SAGECal libdirac
RUN git shallow-clone https://github.com/nlesc-dirac/sagecal.git
ARG SAGECAL_COMMIT=master
RUN git clone --no-checkout https://github.com/nlesc-dirac/sagecal.git
RUN git -C sagecal checkout ${SAGECAL_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DLIB_ONLY=1 \
......@@ -123,7 +132,9 @@ RUN cmake \
RUN ninja -C /src/sagecal/build install
# Install DP3
RUN git shallow-clone https://git.astron.nl/RD/DP3.git
ARG DP3_COMMIT=master
RUN git clone --no-checkout https://git.astron.nl/RD/DP3.git
RUN git -C DP3 checkout ${DP3_COMMIT}
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING=OFF \
......@@ -137,7 +148,9 @@ RUN cmake \
RUN ninja -C /src/DP3/build install
# Install python-casacore
RUN git clone https://github.com/casacore/python-casacore.git
ARG PYTHON_CASACORE_COMMIT=master
RUN git clone --no-checkout https://github.com/casacore/python-casacore.git
RUN git -C python-casacore checkout ${PYTHON_CASACORE_COMMIT}
RUN CASACORE_DATA=/usr/local/share/casacore/data \
python3 -m pip install -v /src/python-casacore
......@@ -159,6 +172,26 @@ FROM ubuntu:22.04 AS runner
COPY --from=builder /usr/local /usr/local
# Repeat version arguments for the runner
ARG \
LOFARSTMAN_COMMIT=main \
CASACORE_COMMIT=master \
EVERYBEAM_COMMIT=master \
AOFLAGGER_COMMIT=master \
SAGECAL_COMMIT=master \
DP3_COMMIT=master \
PYTHON_CASACORE_COMMIT=master
# Add version information to the metadata of the image
LABEL \
nl.astron.preprocess.lofarstman.version=${LOFARSTMAN_COMMIT} \
nl.astron.preprocess.casacore.version=${CASACORE_COMMIT} \
nl.astron.preprocess.everybeam.version=${EVERYBEAM_COMMIT} \
nl.astron.preprocess.aoflagger.version=${AOFLAGGER_COMMIT} \
nl.astron.preprocess.sagecal.version=${SAGECAL_COMMIT} \
nl.astron.preprocess.dp3.version=${DP3_COMMIT} \
nl.astron.preprocess.python-casacore.version=${PYTHON_CASACORE_COMMIT}
# Only install run-time required packages
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment