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

Add software version arguments to Dockerfile

parent 677bda54
No related branches found
No related tags found
1 merge request!15Add software version arguments to Dockerfile
...@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ...@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
# Prepare the environment for installing the Rapthor source dependencies. # Prepare the environment for installing the Rapthor source dependencies.
WORKDIR /src 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 # By default, build non-portable code, for the oldest CPU that supports AVX2
ARG PORTABLE=FALSE ARG PORTABLE=FALSE
...@@ -64,7 +63,9 @@ wget -qO - https://www.astron.nl/iers/WSRT_Measures.ztar | \ ...@@ -64,7 +63,9 @@ wget -qO - https://www.astron.nl/iers/WSRT_Measures.ztar | \
tar -C /usr/local/share/casacore/data -xzf - tar -C /usr/local/share/casacore/data -xzf -
# Install casacore # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \ -DPORTABLE=${PORTABLE} \
...@@ -75,7 +76,9 @@ RUN cmake \ ...@@ -75,7 +76,9 @@ RUN cmake \
RUN ninja -C /src/casacore/build install RUN ninja -C /src/casacore/build install
# Install LofarStMan # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \ -DPORTABLE=${PORTABLE} \
...@@ -88,7 +91,9 @@ RUN ninja -C /src/LofarStMan/build install ...@@ -88,7 +91,9 @@ RUN ninja -C /src/LofarStMan/build install
# Install EveryBeam # Install EveryBeam
# Do not compile python bindings, they will interfere with the ones in the # Do not compile python bindings, they will interfere with the ones in the
# binary wheel on PyPI. # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_WITH_PYTHON=OFF \ -DBUILD_WITH_PYTHON=OFF \
...@@ -101,7 +106,9 @@ RUN cmake \ ...@@ -101,7 +106,9 @@ RUN cmake \
RUN ninja -C /src/EveryBeam/build install RUN ninja -C /src/EveryBeam/build install
# Install AOFlagger # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DPORTABLE=${PORTABLE} \ -DPORTABLE=${PORTABLE} \
...@@ -112,7 +119,9 @@ RUN cmake \ ...@@ -112,7 +119,9 @@ RUN cmake \
RUN ninja -C /src/aoflagger/build install RUN ninja -C /src/aoflagger/build install
# Install SAGECal libdirac # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DLIB_ONLY=1 \ -DLIB_ONLY=1 \
...@@ -123,7 +132,9 @@ RUN cmake \ ...@@ -123,7 +132,9 @@ RUN cmake \
RUN ninja -C /src/sagecal/build install RUN ninja -C /src/sagecal/build install
# Install DP3 # 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 \ RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING=OFF \ -DBUILD_TESTING=OFF \
...@@ -136,7 +147,9 @@ RUN cmake \ ...@@ -136,7 +147,9 @@ RUN cmake \
RUN ninja -C /src/DP3/build install RUN ninja -C /src/DP3/build install
# Install python-casacore # 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 \ RUN CASACORE_DATA=/usr/local/share/casacore/data \
python3 -m pip install -v /src/python-casacore python3 -m pip install -v /src/python-casacore
...@@ -158,6 +171,26 @@ FROM ubuntu:22.04 AS runner ...@@ -158,6 +171,26 @@ FROM ubuntu:22.04 AS runner
COPY --from=builder /usr/local /usr/local 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 # Only install run-time required packages
RUN export DEBIAN_FRONTEND=noninteractive && \ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \ apt-get update && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment