Skip to content
Snippets Groups Projects
Commit 4261cd29 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8589: Added TBB Writer Dockerfile

parents 35f48920 ec2d0f5d
No related branches found
No related tags found
No related merge requests found
......@@ -2362,6 +2362,9 @@ Docker/lofar-base/bashrc.d/50-lofar -text
Docker/lofar-base/chuser.sh -text
Docker/lofar-outputproc/Dockerfile.tmpl -text
Docker/lofar-pipeline/Dockerfile.tmpl -text
Docker/lofar-tbbwriter/Dockerfile -text
Docker/lofar-tbbwriter/bashrc -text
Docker/lofar-tbbwriter/chuser.sh -text
JAVA/GUI/Plotter/dist/lib/sgt.jar -text svneol=unset#unset
JAVA/GUI/Plotter/doc/Plotter.EAP -text
JAVA/GUI/Plotter/doc/javadoc/resources/inherit.gif -text
......
......@@ -60,6 +60,7 @@ install(DIRECTORY
lofar-base
lofar-pipeline
lofar-outputproc
lofar-tbbwriter
DESTINATION share/docker
USE_SOURCE_PERMISSIONS
PATTERN Dockerfile.tmpl EXCLUDE)
......@@ -11,5 +11,6 @@ cd ${LOFARROOT}/share/docker
build lofar-base && \
build lofar-pipeline && \
build lofar-outputproc
build lofar-outputproc && \
build lofar-tbb
#
# base
#
FROM ubuntu:12.04
#
# common-environment
#
ENV USER=lofar
ENV INSTALLDIR=/opt
#
# environment
#
ENV DEBIAN_FRONTEND=noninteractive \
PYTHON_VERSION=2.7
#
# versions
# Requires boost 1.48
# Remove casacore?
#
ENV CASACORE_VERSION=2.0.3 \
CASAREST_VERSION=1.4.1 \
PYTHON_CASACORE_VERSION=2.0.1 \
BOOST_VERSION=1.48
#
# set-uid
#
ENV UID=1000
#
# set-build-options
#
ENV J=6
#
# Base and runtime dependencies
#
#RUN sed -i 's/archive.ubuntu.com/osmirror.rug.nl/' /etc/apt/sources.list
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y sudo
#python2.7 libpython2.7
# apt-get install -y libblas3 liblapacke python-numpy libcfitsio3 libwcs4 libfftw3-bin libhdf5-7 libboost-python${BOOST_VERSION}.0 && \
# apt-get install -y nano
#
# setup-account
#
RUN (getent group sudo &>/dev/null || groupadd sudo) && \
echo "useradd -m ${USERADD_FLAGS} ${USER}" && \
useradd -m -u ${UID} ${USER} && \
usermod -a -G sudo ${USER} && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
sed -i 's/requiretty/!requiretty/g' /etc/sudoers
#
# setup install dir
#
RUN mkdir -p ${INSTALLDIR} && chown ${USER}.${USER} ${INSTALLDIR}
USER ${USER}
#
# *******************
# Lofar User Software
# *******************
#
RUN sudo apt-get update && sudo apt-get upgrade -y && \
sudo apt-get install -y g++ gfortran flex swig bison subversion \
zlib1g-dev libatlas-base-dev liblapack-dev \
libncurses5-dev libfreetype6-dev libpng12-dev \
python-dev python-tk python-pyfits tk8.5-dev fftw3-dev \
libbz2-dev libghc-readline-dev \
git git git-core git-doc git-man git-svn \
valgrind
RUN sudo apt-get install -y libboost${BOOST_VERSION}-all-dev \
wcslib-dev \
cmake cmake-doc cmake-curses-gui make \
libgsl0-dev \
python-matplotlib \
python-sphinx \
libcfitsio3-dev \
python-numpy \
num-utils \
python-scipy \
libblas-dev \
python-sip-dev \
openmpi-bin openmpi-common \
ipython
RUN cd $INSTALLDIR && svn co http://usg.lofar.org/svn/code/trunk lofarsoft && \
export LOFARSOFT=${INSTALLDIR}/lofarsoft && . $LOFARSOFT/devel_common/scripts/init.sh && \
cd $LOFARSOFT && ./bootstrap && cd build && cmake -DCASACORE_FROM_LATEST_SVN_REVISION=ON . && make rebuild_cache
ENV LOFARSOFT=${INSTALLDIR}/lofarsoft
RUN . $LOFARSOFT/devel_common/scripts/init.sh && cd $LOFARSOFT/build && make hdf5
RUN . $LOFARSOFT/devel_common/scripts/init.sh && cd $LOFARSOFT/build && make dal1
#
# config
#
COPY bashrc /opt/bashrc
#
# entry
#
COPY chuser.sh /usr/local/bin/chuser.sh
WORKDIR /home/${USER}
ENTRYPOINT ["sudo","-E","/usr/local/bin/chuser.sh"]
#!/bin/bash
# lofar
[ -r ${INSTALLDIR}/lofar/lofarinit.sh ] && source ${INSTALLDIR}/lofar/lofarinit.sh
export PATH PYTHONPATH LD_LIBRARY_PATH LOFARROOT
# qpid
#source ${INSTALLDIR}/qpid/.profile
# lofarsoft
source ${LOFARSOFT}/devel_common/scripts/init.sh
#!/usr/bin/env bash
# Fetch the user name used in this container
export USER=${SUDO_USER}
if [ -n "${LUSER}" ]; then
if [ -z "${LGROUP}" ]; then
LGROUP=${LUSER}
fi
OLDID=`id -u ${USER}`
# Replace USER by LUSER:LGROUP
sed -i -e "s/${USER}:x:[0-9]\+:[0-9]\+/${USER}:x:${LUSER}:${LGROUP}/g" /etc/passwd
sed -i -e "s/${USER}:x:[0-9]\+:/${USER}:x:${LGROUP}:/g" /etc/group
# Set ownership of home dir to new user
chown --from=${OLDID} -R ${LUSER}:${LGROUP} ${HOME}
# Set ownership of installed software to new user
chown --from=${OLDID} -R ${LUSER}:${LGROUP} /opt
fi
# Update environment for updated user
export HOME=/home/${USER}
# Import bashrc for software in /opt
source /opt/bashrc
# Use exec to make sure we propagate signals
# `env' is needed to propagate PATH variables through sudo.
exec sudo -u ${USER} -E env "PATH=$PATH" "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" "PYTHONPATH=$PYTHONPATH" "$@"
......@@ -103,3 +103,53 @@ locus097 00:02:c9:0e:37:fe 10.135.255.22
locus098 00:02:c9:0e:37:fe 10.135.255.23
locus099 00:02:c9:0e:37:fe 10.135.255.24
locus100 00:02:c9:0e:37:fe 10.135.255.25
cpu01 44:a8:42:32:3d:1e 10.168.153.1
cpu02 44:a8:42:36:9f:6a 10.168.153.2
cpu03 44:a8:42:36:61:ea 10.168.153.3
cpu04 44:a8:42:2f:e7:ae 10.168.153.4
cpu05 44:a8:42:36:88:3f 10.168.153.5
cpu06 44:a8:42:38:76:c7 10.168.153.6
cpu07 44:a8:42:2f:ed:60 10.168.153.7
cpu08 44:a8:42:2f:6d:d3 10.168.153.8
cpu09 44:a8:42:2f:d0:58 10.168.153.9
cpu10 44:a8:42:2f:76:4d 10.168.153.10
cpu11 44:a8:42:2f:cc:f4 10.168.153.11
cpu12 44:a8:42:2f:76:71 10.168.153.12
cpu13 44:a8:42:2f:dc:e4 10.168.153.13
cpu14 44:a8:42:36:a2:0a 10.168.153.14
cpu15 44:a8:42:2f:c9:24 10.168.153.15
cpu16 44:a8:42:2f:77:1d 10.168.153.16
cpu17 44:a8:42:36:3e:05 10.168.153.17
cpu18 44:a8:42:2f:97:34 10.168.153.18
cpu19 44:a8:42:36:65:da 10.168.153.19
cpu20 44:a8:42:36:67:9b 10.168.153.20
cpu21 44:a8:42:36:67:ef 10.168.153.21
cpu22 44:a8:42:36:5a:71 10.168.153.22
cpu23 44:a8:42:31:df:b3 10.168.153.23
cpu24 44:a8:42:36:41:35 10.168.153.24
cpu25 44:a8:42:36:4b:c6 10.168.153.25
cpu26 44:a8:42:36:9f:22 10.168.153.26
cpu27 44:a8:42:2f:b8:ce 10.168.153.27
cpu28 44:a8:42:31:ea:1a 10.168.153.28
#cpu29 44:a8:00:00:00:00 10.168.153.29 # <--- MAC address TBD
cpu30 44:a8:42:36:55:d3 10.168.153.30
cpu31 44:a8:42:2f:eb:08 10.168.153.31
cpu32 44:a8:42:36:ad:90 10.168.153.32
cpu33 44:a8:42:36:86:b3 10.168.153.33
cpu34 44:a8:42:36:83:36 10.168.153.34
cpu35 44:a8:42:31:dc:ce 10.168.153.35
cpu36 44:a8:42:2f:e7:74 10.168.153.36
cpu37 44:a8:42:2f:98:b9 10.168.153.37
cpu38 44:a8:42:36:59:bd 10.168.153.38
cpu39 44:a8:42:36:42:01 10.168.153.39
cpu40 44:a8:42:36:3c:25 10.168.153.40
cpu41 44:a8:42:2f:ed:8e 10.168.153.41
cpu42 44:a8:42:32:0c:e1 10.168.153.42
cpu43 44:a8:42:36:a5:0a 10.168.153.43
cpu44 44:a8:42:36:39:cd 10.168.153.44
cpu45 44:a8:42:36:83:4e 10.168.153.45
cpu46 44:a8:42:36:68:2b 10.168.153.46
cpu47 44:a8:42:36:b0:b4 10.168.153.47
cpu48 44:a8:42:36:b0:e4 10.168.153.48
cpu49 44:a8:42:36:84:97 10.168.153.49
cpu50 44:a8:42:36:a2:16 10.168.153.50
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