From 1dc66f81eb554193f3e308eed061fca57b97ee88 Mon Sep 17 00:00:00 2001 From: Thomas Orozco Date: Tue, 1 Sep 2015 21:14:44 +0200 Subject: [PATCH] Accelerate local builds by caching psutil, prctl --- Dockerfile | 3 ++- ci/run_build.sh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c688c9..7eb5bf2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,5 @@ RUN apt-get update \ && apt-get install --no-install-recommends --yes build-essential git gdb valgrind cmake rpm python-dev libcap-dev python-pip python-virtualenv \ && rm -rf /var/lib/apt/lists/* -RUN pip install psutil +# Pre-install those here for faster local builds. +RUN CFLAGS="-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37" pip install psutil python-prctl diff --git a/ci/run_build.sh b/ci/run_build.sh index ba2ba2d..74f30f9 100755 --- a/ci/run_build.sh +++ b/ci/run_build.sh @@ -62,9 +62,10 @@ for tini in "${BUILD_DIR}/tini" "${BUILD_DIR}/tini-static"; do fi done -# Create virtual environment to run tests +# Create virtual environment to run tests. +# Accept system site packages for faster local builds. VENV="${BUILD_DIR}/venv" -virtualenv "${VENV}" +virtualenv --system-site-packages "${VENV}" # Don't use activate because it does not play nice with nounset export PATH="${VENV}/bin:${PATH}"