Skip to content
Snippets Groups Projects
Commit 345d1ecf authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-835: trying to get a working dockerfile.

parent f0ebe9f1
No related branches found
No related tags found
1 merge request!88Resolve SW-835
...@@ -44,18 +44,22 @@ ENV LOFAR_BRANCH=${LOFAR_BRANCH} \ ...@@ -44,18 +44,22 @@ ENV LOFAR_BRANCH=${LOFAR_BRANCH} \
LOFAR_BUILDVARIANT=gnucxx11_opt LOFAR_BUILDVARIANT=gnucxx11_opt
# Install # Install
RUN apt-get update && apt-get install -y git cmake g++ gfortran bison flex autogen liblog4cplus-dev libhdf5-dev libboost-dev boost-python${BOOST_VERSION}-dev libxml2-dev pkg-config libpng-dev libfftw3-dev libunittest++-dev libxml++2.6-dev libboost-filesystem${BOOST_VERSION}-dev libboost-date-time${BOOST_VERSION}-dev libboost-thread${BOOST_VERSION}-dev libboost-regex${BOOST_VERSION}-dev binutils-dev libopenblas-dev libcfitsio-dev wcslib-dev && \ RUN apt-get update && apt-get install -y git cmake g++ gfortran bison flex autogen liblog4cplus-dev libhdf5-dev libboost-dev boost-python${BOOST_VERSION}-dev libxml2-dev pkg-config libpng-dev libfftw3-dev libunittest++-dev libxml++2.6-dev libboost-filesystem${BOOST_VERSION}-dev libboost-date-time${BOOST_VERSION}-dev libboost-thread${BOOST_VERSION}-dev libboost-regex${BOOST_VERSION}-dev binutils-dev libopenblas-dev libcfitsio-dev wcslib-dev libreadline-dev
mkdir -p ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && \
RUN echo "LOFAR_VERSION = $LOFAR_VERSION"
RUN mkdir -p ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && \
git clone --depth 1 --shallow-submodules --branch ${LOFAR_VERSION//latest/master} https://git.astron.nl/ro/lofar.git ${INSTALLDIR}/lofar/src && \ git clone --depth 1 --shallow-submodules --branch ${LOFAR_VERSION//latest/master} https://git.astron.nl/ro/lofar.git ${INSTALLDIR}/lofar/src && \
cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && \ cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && \
cmake -DBUILD_PACKAGES=TBBWriter -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/lofar/ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCASAREST_ROOT_DIR=${INSTALLDIR}/casarest/ -DCASACORE_ROOT_DIR=${INSTALLDIR}/casacore/ -DDAL_ROOT_DIR=${INSTALLDIR}/DAL ${INSTALLDIR}/lofar/src/ && \ cmake -DBUILD_PACKAGES=TBBWriter -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/lofar/ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCASACORE_ROOT_DIR=${INSTALLDIR}/casacore/ -DDAL_ROOT_DIR=${INSTALLDIR}/DAL -DQPID_ROOT_DIR=${INSTALLDIR}/qpid ${INSTALLDIR}/lofar/src/ && \
cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && make -j ${J} && \ cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && make -j ${J} && \
cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && make install && \ cd ${INSTALLDIR}/lofar/build/${LOFAR_BUILDVARIANT} && make install && \
bash -c "mkdir -p /home/${USER}/lofar/var/{log,run}" && \ bash -c "mkdir -p /home/${USER}/lofar/var/{log,run}" && \
bash -c "ln -sfT /home/${USER}/lofar/var ${INSTALLDIR}/lofar/var" && \ bash -c "ln -sfT /home/${USER}/lofar/var ${INSTALLDIR}/lofar/var" && \
bash -c "strip ${INSTALLDIR}/lofar/{bin,sbin,lib64}/* || true" && \ bash -c "strip ${INSTALLDIR}/lofar/{bin,sbin,lib64}/* || true" && \
bash -c "rm -rf ${INSTALLDIR}/lofar/{build,src}" && \ bash -c "rm -rf ${INSTALLDIR}/lofar/{build,src}" && \
setcap cap_sys_nice,cap_sys_admin=ep ${INSTALLDIR}/lofar/bin/TBB_Writer && \ setcap cap_sys_nice,cap_sys_admin=ep ${INSTALLDIR}/lofar/bin/TBB_Writer
apt-get purge -y git cmake g++ gfortran bison flex autogen liblog4cplus-dev libhdf5-dev libboost-dev libboost-python${BOOST_VERSION}-dev libxml2-dev pkg-config libpng12-dev libfftw3-dev libunittest++-dev libxml++2.6-dev libboost-filesystem${BOOST_VERSION}-dev libboost-date-time${BOOST_VERSION}-dev libboost-thread${BOOST_VERSION}-dev binutils-dev libcfitsio3-dev wcslib-dev libopenblas-dev && \
RUN apt-get purge -y git cmake g++ gfortran bison flex autogen liblog4cplus-dev libhdf5-dev libboost-dev libboost-python${BOOST_VERSION}-dev libxml2-dev pkg-config libpng12-dev libfftw3-dev libunittest++-dev libxml++2.6-dev libboost-filesystem${BOOST_VERSION}-dev libboost-date-time${BOOST_VERSION}-dev libboost-thread${BOOST_VERSION}-dev binutils-dev libcfitsio3-dev wcslib-dev libopenblas-dev libreadline-dev && \
apt-get autoremove -y --purge apt-get autoremove -y --purge
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