Docker: Make build more quiet and resilient

This commit is contained in:
Ole Schütt 2019-04-25 15:00:52 +02:00 committed by GitHub
parent e4148ef030
commit 165051c36d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 86 additions and 45 deletions

View file

@ -3,10 +3,10 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get update -qq
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
apt-get install -y --no-install-recommends \
apt-get install -qq --no-install-recommends \
build-essential \
python-setuptools \
python-wheel \
@ -19,7 +19,7 @@ apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/*
# install python packages
pip install flake8 aiida ase
pip install --quiet flake8 aiida ase
# create ubuntu user with sudo powers
adduser --disabled-password --gecos "" ubuntu
@ -34,7 +34,12 @@ ln -vs /opt/cp2k-toolchain/install/arch/local* .
# pre-build cp2k
cd /workspace/cp2k
make -j VERSION=pdbg
echo -n "Warming cache by trying to compile... "
if make -j VERSION=pdbg &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf lib exe
#EOF

View file

@ -3,8 +3,8 @@
# author: Ole Schuett
# install python packages
apt-get update
apt-get install -y --no-install-recommends \
apt-get update -qq
apt-get install -qq --no-install-recommends \
python3 \
python3-dev \
python3-pip \
@ -14,10 +14,10 @@ apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/*
# install python packages
pip3 install numpy scipy matplotlib flask
pip3 install --quiet numpy scipy matplotlib flask
# clone ase reprository
git clone --depth=1 --single-branch -b master https://gitlab.com/ase/ase.git /opt/ase
git clone --quiet --depth=1 --single-branch -b master https://gitlab.com/ase/ase.git /opt/ase
# shellcheck disable=SC1091
source /opt/cp2k-toolchain/install/setup
@ -28,7 +28,12 @@ ln -vs /opt/cp2k-toolchain/install/arch/local* .
# pre-build cp2k
cd /workspace/cp2k
make -j VERSION=pdbg
echo -n "Warming cache by trying to compile... "
if make -j VERSION=pdbg &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf lib exe
#EOF

View file

@ -3,8 +3,8 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
apt-get update -qq
apt-get install -qq --no-install-recommends \
autoconf \
autogen \
automake \
@ -21,9 +21,10 @@ apt-get install -y --no-install-recommends \
rsync \
unzip \
wget
rm -rf /var/lib/apt/lists/*
# clone cp2k repository
git clone --recursive --depth=1 --single-branch -b master https://github.com/cp2k/cp2k.git /workspace/cp2k
git clone --quiet --recursive --depth=1 --single-branch -b master https://github.com/cp2k/cp2k.git /workspace/cp2k
#EOF

View file

@ -11,7 +11,13 @@ ln -vs /opt/cp2k-toolchain/install/arch/local* .
# pre-build cp2k
cd /workspace/cp2k/tools/conventions
./test_conventions.sh
echo -n "Warming cache by trying run test_conventions.sh... "
if ./test_conventions.sh &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf ../lib/ ../exe/
#EOF

View file

@ -3,12 +3,17 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends libfindbin-libs-perl
apt-get update -qq
apt-get install -qq --no-install-recommends libfindbin-libs-perl
rm -rf /var/lib/apt/lists/*
# pre-run prettify
cd /workspace/cp2k
make -j 16 pretty
echo -n "Warming cache by trying to run make pretty... "
if make -j 16 pretty &> /dev/null ; then
echo "done."
else
echo "failed."
fi
#EOF

View file

@ -3,8 +3,8 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
apt-get update -qq
apt-get install -qq --no-install-recommends \
python \
python-pip \
python-wheel \
@ -12,10 +12,10 @@ apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/*
# install python packages
pip install numpy
pip install --quiet numpy
# clone i-pi repository
git clone --depth=1 --single-branch -b master https://github.com/i-pi/i-pi.git /opt/i-pi
git clone --quiet --depth=1 --single-branch -b master https://github.com/i-pi/i-pi.git /opt/i-pi
# shellcheck disable=SC1091
source /opt/cp2k-toolchain/install/setup
@ -26,7 +26,12 @@ ln -vs /opt/cp2k-toolchain/install/arch/local* .
# pre-build cp2k
cd /workspace/cp2k
make -j VERSION=pdbg
echo -n "Warming cache by trying to compile... "
if make -j VERSION=pdbg &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf lib exe
#EOF

View file

@ -3,9 +3,9 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
default-jre-headless \
apt-get update -qq
apt-get install -qq --no-install-recommends \
default-jre-headless \
libsaxonhe-java
rm -rf /var/lib/apt/lists/*
@ -18,7 +18,12 @@ ln -vs /opt/cp2k-toolchain/install/arch/local* .
# pre-build cp2k
cd /workspace/cp2k
make -j VERSION=psmp
echo -n "Warming cache by trying to compile... "
if make -j VERSION=psmp &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf lib exe
#EOF

View file

@ -3,8 +3,8 @@
# author: Ole Schuett
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
apt-get update -qq
apt-get install -qq --no-install-recommends \
python \
python3 \
python-pip \
@ -19,17 +19,19 @@ apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/*
# install python packages
pip install numpy matplotlib requests
pip3 install numpy matplotlib requests
pip install --quiet numpy matplotlib requests
pip3 install --quiet numpy matplotlib requests
# install python2.6
echo "Building Python-2.6.9... "
cd /tmp
wget -q https://www.python.org/ftp/python/2.6.9/Python-2.6.9.tgz
echo "7277b1285d8a82f374ef6ebaac85b003266f7939b3f2a24a3af52f9523ac94db Python-2.6.9.tgz" | sha256sum --check
tar -xzf Python-2.6.9.tgz
pushd Python-2.6.9
./configure
make -j
make install
./configure > /tmp/python2.6.9_configure.log
make -j > /tmp/python2.6.9_make.log
make install > /tmp/python2.6.9_install.log
popd
rm -rf Python-2.6.9*

View file

@ -19,7 +19,7 @@ source /opt/cp2k-toolchain/install/setup
# pre-build cp2k
cd /workspace/cp2k
echo -n "Trying to compile... "
echo -n "Warming cache by trying to compile... "
if make -j ARCH="${ARCH}" VERSION="${VERSION}" &> /dev/null ; then
echo "done."
else

View file

@ -3,8 +3,8 @@
# author: Ole Schuett
# install numpy
apt-get update
apt-get install -y --no-install-recommends python-numpy
apt-get update -qq
apt-get install -qq --no-install-recommends python-numpy
rm -rf /var/lib/apt/lists/*
# setup arch files
@ -16,9 +16,16 @@ source /opt/cp2k-toolchain/install/setup
# pre-build cp2k
cd /workspace/cp2k
make -j VERSION="popt" cp2k
make -j VERSION="psmp" cp2k
make -j VERSION="ssmp" cp2k
echo -n "Warming cache by trying to compile... "
if make -j VERSION="popt" cp2k &> /dev/null && \
make -j VERSION="psmp" cp2k &> /dev/null && \
make -j VERSION="ssmp" cp2k &> /dev/null ; then
echo "done."
else
echo "failed."
fi
rm -rf lib exe
#EOF

View file

@ -10,8 +10,8 @@ fi
GCC_VERSION=$1
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
apt-get update -qq
apt-get install -qq --no-install-recommends \
gcc-${GCC_VERSION} \
g++-${GCC_VERSION} \
gfortran-${GCC_VERSION} \

View file

@ -19,11 +19,11 @@ chmod +x /usr/bin/cp2k
echo -e "\n========== Installing AiiDA-CP2K plugin =========="
cd /opt/
git clone https://github.com/cp2k/aiida-cp2k.git
pip install ./aiida-cp2k/[pre-commit]
git clone --quiet https://github.com/cp2k/aiida-cp2k.git
pip install --quiet ./aiida-cp2k/[pre-commit]
# workaround for dependency chain in 1.0.0b1
pip install 'topika==0.1.3'
pip install --quiet 'topika==0.1.3'
echo -e "\n========== Configuring AiiDA =========="
for i in $(dirname "$(which mpirun)")/* ; do ln -sf "$i" /usr/bin/; done

View file

@ -11,8 +11,8 @@ make -j VERSION=pdbg cp2k
echo -e "\n========== Installing i-Pi =========="
cd /opt/i-pi
git pull
pip install .
git pull --quiet
pip install --quiet .
echo -e "\n========== Running i-Pi Tests =========="