From c1af8c28e5aa08b25cf003c383df47d1cf0b144d Mon Sep 17 00:00:00 2001 From: brosenberg42 Date: Tue, 3 Dec 2024 10:50:24 -0500 Subject: [PATCH 1/2] Install g++ when installing text splitter (#228) --- components/python/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/python/Dockerfile b/components/python/Dockerfile index 4c5e616e..bea5ce3c 100644 --- a/components/python/Dockerfile +++ b/components/python/Dockerfile @@ -61,11 +61,20 @@ ENV PATH $COMPONENT_VIRTUALENV/bin:/scripts:$PATH ######################################### FROM common AS build_api +RUN --mount=type=tmpfs,target=/var/cache/apt \ + --mount=type=tmpfs,target=/var/lib/apt/lists \ + --mount=type=tmpfs,target=/tmp \ + apt-get update; \ + # Some pip packages will try to compile C/C++ extensions during install. To compile the C/C++ + # extensions, a C++ compiler and the Python development headers must be installed. + apt-get install --no-install-recommends -y g++ python3.8-dev + RUN python3 -m venv "$COMPONENT_VIRTUALENV"; \ pip config --site set global.no-cache-dir true; \ + pip install --upgrade pip; \ pip install --upgrade setuptools; -RUN --mount=from=openmpf_build,source=/home/mpf/openmpf-projects/openmpf-python-component-sdk/detection,target=/tmp/python \ +RUN --mount=from=openmpf_build,source=/home/mpf/openmpf-projects/openmpf-python-component-sdk/detection,target=/tmp/python,rw \ pip3 install --no-cache-dir /tmp/python/api /tmp/python/component_util; \ python3 -m unittest discover --verbose --buffer --start-directory /tmp/python/component_util/tests From 4561b5b421210813d0ee456b77c1c8f28cf944d7 Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Wed, 4 Dec 2024 07:16:14 -0500 Subject: [PATCH 2/2] Fix interpolation issue in Jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 836f79f2..c661f88d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -359,7 +359,8 @@ try { withEnv(["COMPOSE_FILE=$componentComposeFiles"]) { def componentComposeYaml = - readYaml(text: shOutput('docker compose config --no-interpolate --no-consistency')) + readYaml(text: shOutput('docker compose config --no-interpolate ' + + '--no-consistency --no-path-resolution --no-normalize')) if (env.docker_services_to_build) { def searchImages = env.docker_services_to_build.split(',') @@ -756,7 +757,7 @@ def dockerCleanUp() { } } } - + parallel stepsForParallel sh 'docker builder prune --force --keep-storage=120GB'