Commit 33e0629e authored by mancini's avatar mancini

Fix dockerfile


Former-commit-id: b0492ad9
parent ea477dc7
*.tar.xz filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
FROM kernsuite/base:5 as builder
SHELL ["/bin/bash", "-c"]
ARG NPROCS=2
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
apt-get install -y \
casacore-data \
casacore-dev \
libboost-python-dev \
......@@ -14,17 +14,23 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
build-essential \
libhdf5-serial-dev \
libarmadillo-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-thread-dev \
libboost-system-dev \
libboost-program-options-dev \
libboost-chrono-dev \
libboost-atomic-dev \
libboost-system-dev \
libboost-date-time-dev \
libboost-numpy-dev \
libboost-signals-dev \
libboost-signals-dev \
libboost-program-options-dev \
libboost-test-dev \
libxml2-dev \
libpng-dev \
lua5.3-dev \
pkg-config \
aoflagger-dev \
libgtkmm-3.0-dev \
git \
wget \
......@@ -36,42 +42,55 @@ WORKDIR /src/
# Build the IDG version from source
ADD ./idg /src/idg/src
RUN mkdir idg/build && cd idg/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ ../src && make install -j2
RUN mkdir idg/build && cd idg/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ ../src && make install -j$NPROCS
ADD ./DP3 /src/dp3/src
RUN cd /src/dp3/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True &&\
make -j2 && \
make install -j2
ADD ./STMAN /src/STMAN/src
RUN cd /src/STMAN/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True && \
make -j2 && \
make install -j2
make -j$NPROCS && \
make install -j$NPROCS
ADD ./Dysco /src/Dysco/src
RUN cd /src/Dysco/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True && \
make -j2 && \
make install -j2
make -j$NPROCS && \
make install -j$NPROCS
ADD ./LOFARBeam /src/LOFARBeam/src
RUN cd /src/LOFARBeam/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPYTHON_EXECUTABLE=/usr/bin/python3 && \
make -j2 && \
make install -j2
make -j$NPROCS && \
make install -j$NPROCS
ADD ./aoflagger /src/aoflagger/src
RUN cd /src/aoflagger/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True &&\
make -j$NPROCS && \
make install -j$NPROCS
ADD ./DP3 /src/dp3/src
RUN cd /src/dp3/ && \
mkdir build && \
cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True &&\
make -j$NPROCS && \
make install -j$NPROCS
ADD ./wsclean/wsclean /src/WSClean/src
RUN cd /src/WSClean/ && \
mkdir build && cd build && \
cmake ../src -DCMAKE_INSTALL_PREFIX=/usr/local/ -DPORTABLE=True &&\
make -j$NPROCS && make install -j$NPROCS
#----------------------------------------------
FROM kernsuite/base:5 as runner
......@@ -83,9 +102,13 @@ SHELL ["/bin/bash", "-c"]
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
aoflagger \
casacore-data \
libarmadillo8 \
libboost-filesystem1.65.1 \
libboost-thread1.65.1 \
libboost-chrono1.65.1 \
libboost-atomic1.65.1 \
libboost-program-options1.65.1 \
libboost-date-time1.65.1 \
libboost-filesystem1.65.1 \
libboost-numpy1.65.1 \
......@@ -99,10 +122,12 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libcasa-* \
libcfitsio5 \
libgtkmm-3.0 \
libgsl23 \
libfftw3-3 \
libhdf5-cpp-100 \
libpng16-16 \
libxml2 \
lua5.3 \
python3.7 \
python3-casacore \
python3-numpy \
......@@ -132,16 +157,18 @@ LABEL Dysco.version.tag=${Dysco_TAG}
ARG LofarBeam_TAG=master
LABEL LOFARBeam.version.tag=${LofarBeam_TAG}
ARG WSCLEAN_TAG=master
LABEL WSClean.version.tag=${WSClean_TAG}
RUN apt-get --allow-releaseinfo-change update -y && apt install -y nodejs python3-pip git wsclean
RUN apt-get --allow-releaseinfo-change update -y && apt install -y nodejs python3-pip git
RUN python3 -m pip install cwltool cwl-runner -e "git://github.com/darafferty/LSMTool.git@${LSMTool_TAG}#egg=LSMTool" \
"toil[cwl]"==${TOIL_VERSION} \
matplotlib
RUN python3 -m pip install -e "git+https://github.com/revoltek/losoto.git@${LoSoTo_TAG}#egg=LoSoTo"
ADD losoto.patch /home/lofaruser/losoto.patch
RUN patch /src/losoto/losoto/operations/__init__.py /home/lofaruser/losoto.patch
ADD .entrypoint /home/lofaruser/.entrypoint
RUN chown lofaruser:lofaruser /home/lofaruser/.entrypoint && \
chmod +rx /home/lofaruser/.entrypoint
......@@ -158,3 +185,5 @@ ARG IDG_TAG=master
LABEL IDG.version.tag=${IDG_TAG}
LABEL DP3.version.tag=${DP3_TAG}
LABEL AOFLAGGER.version.tag=${AOFLAGGER_TAG}
......@@ -5,24 +5,33 @@ git_clone_or_pull () {
REPO=$1
BRANCH=$2
DIR=$3
OLD_DIR=${PWD}
if [ -d $DIR ]
then
git -C "${DIR}" pull
then
cd ${DIR}
git checkout ${BRANCH}
git pull
cd ${OLD_DIR}
else
git clone --depth 1 -b "${BRANCH}" "${REPO}" "${DIR}"
fi
}
# SOFTWARE VERSIONS
AOFLAGGER_TAG=v2.15.0
DP3_TAG=v4.1
IDG_TAG=0.6
IDG_TAG=master
LSMTool_TAG=v1.4.2
LoSoTo_TAG=f0398b
LoSoTo_TAG=master
TOIL_VERSION=3.20.0
STMAN_TAG=master
Dysco_TAG=v1.2
Prefactor_TAG=master
LofarBeam_TAG=master
wsclean_tag=master
# FETCHES AOFLAGGER
git_clone_or_pull https://git.code.sf.net/p/aoflagger/code ${AOFLAGGER_TAG} aoflagger
# FETCHES THE IDG
git_clone_or_pull https://gitlab.com/astron-idg/idg/ ${IDG_TAG} idg
......@@ -39,6 +48,9 @@ git_clone_or_pull https://github.com/aroffringa/dysco.git ${Dysco_TAG} Dysco
# FETCHES LOFARBeam
git_clone_or_pull https://github.com/lofar-astron/LOFARBeam ${LofarBeam_TAG} LOFARBeam
# FETCHES WSClean
git_clone_or_pull https://git.code.sf.net/p/wsclean/code ${wsclean_tag} wsclean
SCRIPT_PATH=$(realpath ${BASH_SOURCE[0]})
DOCKER_PATH=$(dirname ${SCRIPT_PATH})
......@@ -50,7 +62,9 @@ docker build ${DOCKER_PATH} --build-arg=IDG_TAG=${IDG_TAG}\
--build-arg=STMAN_TAG=${STMAN_TAG}\
--build-arg=Dysco_TAG=${Dysco_TAG}\
--build-arg=TOIL_VERSION=${TOIL_VERSION}\
--build-arg=LofarBeam_TAG=${LofarBeam_TAG}\
--build-arg=LofarBeam_TAG=${LofarBeam_TAG}\
--build-arg=WSClean_TAG=${wsclean_tag} \
--build-arg=NPROCS=10 \
-t lofareosc/lofar-pipeline
docker build ${DOCKER_PATH} -f ${DOCKER_PATH}/Dockerfile_ci -t lofareosc/lofar-pipeline-ci
--- /src/losoto/losoto/operations/__init__.py 2019-11-07 12:43:46.220577945 +0000
+++ /src/losoto/losoto/operations/__init__.py 2019-11-07 12:43:34.401765786 +0000
@@ -2,8 +2,7 @@
__all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py") if f[0] != '_']
-for x in __all__:
- __import__(x, locals(), globals())
+from . import *
class Timer(object):
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment