Skip to content

Commit

Permalink
Merge pull request #1180 from casacore/remove-kernsuite-dependency
Browse files Browse the repository at this point in the history
Remove dependency on kernsuite image
  • Loading branch information
mnijhuis-tos committed Apr 6, 2022
2 parents c185708 + b04af3a commit 0fcce38
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 40 deletions.
30 changes: 20 additions & 10 deletions docker/ubuntu1804_clang.docker
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM kernsuite/base:6
RUN docker-apt-upgrade
RUN docker-apt-install \
FROM ubuntu:18.04
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
clang \
casacore-data \
cmake \
flex \
bison \
Expand All @@ -20,10 +20,20 @@ RUN docker-apt-install \
libboost-test-dev \
libgsl-dev \
python-numpy \
python3-numpy
python3-numpy \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# Install WSRT Measures (extra casacore data, for tests)
# Note: The file on the ftp site is updated daily. When warnings regarding leap
# seconds appear, ignore them or regenerate the docker image.
&& wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \
&& mkdir -p /usr/local/share/casacore/data \
&& cd /usr/local/share/casacore/data \
&& tar xfz /WSRT_Measures.ztar \
&& rm /WSRT_Measures.ztar
ADD . /code
RUN useradd -ms /bin/bash casacore
RUN chown casacore.casacore /code
RUN useradd -ms /bin/bash casacore \
&& chown casacore.casacore /code
USER casacore
RUN mkdir /code/build
WORKDIR /code/build
Expand All @@ -34,10 +44,10 @@ RUN cmake .. \
-DBUILD_PYTHON=ON \
-DBUILD_PYTHON3=ON \
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \
-DDATA_DIR=/usr/share/casacore/data \
-DDATA_DIR=/usr/local/share/casacore/data \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
RUN make -j2
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
&& make -j`nproc`
USER root
RUN make install
USER casacore
29 changes: 19 additions & 10 deletions docker/ubuntu1804_gcc.docker
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM kernsuite/base:6
RUN docker-apt-upgrade
RUN docker-apt-install \
FROM ubuntu:18.04
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
gcc \
g++ \
casacore-data \
cmake \
flex \
bison \
Expand All @@ -21,10 +21,20 @@ RUN docker-apt-install \
libboost-test-dev \
libgsl-dev \
python-numpy \
python3-numpy
python3-numpy \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# Install WSRT Measures (extra casacore data, for tests)
# Note: The file on the ftp site is updated daily. When warnings regarding leap
# seconds appear, ignore them or regenerate the docker image.
&& wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \
&& mkdir -p /usr/local/share/casacore/data \
&& cd /usr/local/share/casacore/data \
&& tar xfz /WSRT_Measures.ztar \
&& rm /WSRT_Measures.ztar
ADD . /code
RUN useradd -ms /bin/bash casacore
RUN chown casacore.casacore /code
RUN useradd -ms /bin/bash casacore \
&& chown casacore.casacore /code
USER casacore
RUN mkdir /code/build
WORKDIR /code/build
Expand All @@ -35,9 +45,8 @@ RUN cmake .. \
-DBUILD_PYTHON=ON \
-DBUILD_PYTHON3=ON \
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \
-DDATA_DIR=/usr/share/casacore/data
RUN make -j2
-DDATA_DIR=/usr/local/share/casacore/data \
&& make -j`nproc`
USER root
RUN make install
USER casacore

30 changes: 20 additions & 10 deletions docker/ubuntu2004_clang.docker
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM kernsuite/base:7
RUN docker-apt-upgrade
RUN docker-apt-install \
FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
clang \
casacore-data \
cmake \
flex \
bison \
Expand All @@ -20,10 +20,20 @@ RUN docker-apt-install \
libboost-test-dev \
libgsl-dev \
python-is-python3 \
python3-numpy
python3-numpy \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# Install WSRT Measures (extra casacore data, for tests)
# Note: The file on the ftp site is updated daily. When warnings regarding leap
# seconds appear, ignore them or regenerate the docker image.
&& wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \
&& mkdir -p /usr/local/share/casacore/data \
&& cd /usr/local/share/casacore/data \
&& tar xfz /WSRT_Measures.ztar \
&& rm /WSRT_Measures.ztar
ADD . /code
RUN useradd -ms /bin/bash casacore
RUN chown casacore.casacore /code
RUN useradd -ms /bin/bash casacore \
&& chown casacore.casacore /code
USER casacore
RUN mkdir /code/build
WORKDIR /code/build
Expand All @@ -34,10 +44,10 @@ RUN cmake .. \
-DBUILD_PYTHON=OFF \
-DBUILD_PYTHON3=ON \
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \
-DDATA_DIR=/usr/share/casacore/data \
-DDATA_DIR=/usr/local/share/casacore/data \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
RUN make -j2
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
&& make -j`nproc`
USER root
RUN make install
USER casacore
29 changes: 19 additions & 10 deletions docker/ubuntu2004_gcc.docker
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM kernsuite/base:7
RUN docker-apt-upgrade
RUN docker-apt-install \
FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
gcc \
g++ \
casacore-data \
cmake \
flex \
bison \
Expand All @@ -21,10 +21,20 @@ RUN docker-apt-install \
libboost-test-dev \
libgsl-dev \
python-is-python3 \
python3-numpy
python3-numpy \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
# Install WSRT Measures (extra casacore data, for tests)
# Note: The file on the ftp site is updated daily. When warnings regarding leap
# seconds appear, ignore them or regenerate the docker image.
&& wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \
&& mkdir -p /usr/local/share/casacore/data \
&& cd /usr/local/share/casacore/data \
&& tar xfz /WSRT_Measures.ztar \
&& rm /WSRT_Measures.ztar
ADD . /code
RUN useradd -ms /bin/bash casacore
RUN chown casacore.casacore /code
RUN useradd -ms /bin/bash casacore \
&& chown casacore.casacore /code
USER casacore
RUN mkdir /code/build
WORKDIR /code/build
Expand All @@ -35,9 +45,8 @@ RUN cmake .. \
-DBUILD_PYTHON=OFF \
-DBUILD_PYTHON3=ON \
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \
-DDATA_DIR=/usr/share/casacore/data
RUN make -j2
-DDATA_DIR=/usr/local/share/casacore/data \
&& make -j`nproc`
USER root
RUN make install
USER casacore

0 comments on commit 0fcce38

Please sign in to comment.