Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ try {
stage('Build images') {
timeout(time: buildTimeout, unit: 'HOURS') {
// Make sure we are using most recent version of external images
for (externalImage in ['docker/dockerfile:1.2', 'postgres:17-alpine',
'redis:alpine', 'ubuntu:20.04']) {
for (externalImage in ['docker/dockerfile:1.20', 'postgres:17-alpine',
'redis:alpine', 'ubuntu:24.04']) {
try {
sh "docker pull '$externalImage'"
}
Expand Down Expand Up @@ -373,14 +373,14 @@ try {
"../../$customComponentsRepo.path/docker-compose.custom-components.yml"
componentComposeFiles += ":$customComponentsComposeFile"

def customGpuOnlyComponentsComposeFile =
"../../$customComponentsRepo.path/docker-compose.custom-gpu-only-components.yml"
componentComposeFiles += ":$customGpuOnlyComponentsComposeFile"
// def customGpuOnlyComponentsComposeFile =
// "../../$customComponentsRepo.path/docker-compose.custom-gpu-only-components.yml"
// componentComposeFiles += ":$customGpuOnlyComponentsComposeFile"

customComponentServices =
readYaml(text: shOutput("cat $customComponentsComposeFile")).services.keySet()
customComponentServices +=
readYaml(text: shOutput("cat $customGpuOnlyComponentsComposeFile")).services.keySet()
// customComponentServices +=
// readYaml(text: shOutput("cat $customGpuOnlyComponentsComposeFile")).services.keySet()
}

withEnv(["COMPOSE_FILE=$componentComposeFiles"]) {
Expand Down Expand Up @@ -581,7 +581,7 @@ try {

// add tasks the map
for (int i = 0; i < taskCount; i++) {
def taskName = "Task ${i}"
def taskName = "Task ${i}"
tasksToRun[taskName] = taskQueue.remove(0)
}

Expand Down
4 changes: 2 additions & 2 deletions components/cli_runner/tests/test_cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def test_can_run_generic_job(self):

self.assertEqual(1, len(tracks))
track = tracks[0]
self.assertAlmostEqual(95, track['confidence'])
self.assertAlmostEqual(94, track['confidence'])
expected_properties = {
'MISSING_LANGUAGE_MODELS': '',
'OSD_FALLBACK_OCCURRED': 'false',
Expand All @@ -431,7 +431,7 @@ def test_can_run_generic_job(self):
self.assertEqual(0, detection['y'])
self.assertEqual(0, detection['width'])
self.assertEqual(0, detection['height'])
self.assertAlmostEqual(95, detection['confidence'])
self.assertAlmostEqual(94, detection['confidence'])
self.assertEqual(detection, track['exemplar'])
self.assertEqual(expected_properties, detection['detectionProperties'])

Expand Down
60 changes: 32 additions & 28 deletions components/cpp_component_build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -28,39 +28,41 @@

ARG BUILD_REGISTRY
ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_build:${BUILD_TAG} as openmpf_build
FROM ${BUILD_REGISTRY}openmpf_build:${BUILD_TAG} AS openmpf_build


FROM ubuntu:20.04
FROM ubuntu:24.04

SHELL ["/bin/bash", "-o", "errexit", "-o", "pipefail", "-c"]

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/tmp \
apt-get update; \
apt-get upgrade -y; \
--mount=type=tmpfs,target=/tmp <<eot
apt-get update
apt-get upgrade -y
apt-get install --no-install-recommends -y \
wget ca-certificates gnupg2 cmake make g++ libgtest-dev liblog4cxx-dev libboost-dev \
libavcodec58 libavformat58 libswscale5 libopenblas0-pthread liblapacke; \
# Can't set up cuda repo at the beginning because it requires wget ca-certificates gnupg2
wget -O- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub \
| apt-key add -; \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" \
> /etc/apt/sources.list.d/cuda.list; \
apt-get update; \
libavcodec60 libavformat60 libswscale7 libopenblas0-pthread liblapacke

# Cannot set up cuda repo at the beginning because it requires wget ca-certificates gnupg2
wget -O- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub \
| apt-key add -
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" \
> /etc/apt/sources.list.d/cuda.list
apt-get update
apt-get install -y --no-install-recommends \
cuda-minimal-build-11-4 libcudnn8-dev=8.2.4.15-1+cuda11.4 libcudnn8=8.2.4.15-1+cuda11.4 \
libcublas-dev-11-4; \
# OpenCV doesn't use the statically compiled CUDA libraries except for libcudart and they are relatively large.
rm /usr/local/cuda/lib64/libcublasLt_static.a /usr/local/cuda/lib64/libcublas_static.a \
/usr/lib/x86_64-linux-gnu/libcudnn*.a; \
ln --symbolic /usr/bin/cmake /usr/bin/cmake3;
cuda-minimal-build-12-9 libcudnn9-dev-cuda-12 libcublas-dev-12-9

COPY --from=openmpf_build /opt/opencv-4.9.0 /opt/opencv-4.9.0
# OpenCV does not use the statically compiled CUDA libraries except for libcudart and they are relatively large.
find /usr/local/cuda/lib64/ -name '*.a' -not -name 'libcudart_static.a' -delete
ln --symbolic /usr/bin/cmake /usr/bin/cmake3
eot


COPY --from=openmpf_build /opt/opencv-4.13.0 /opt/opencv-4.13.0

COPY --from=openmpf_build /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /usr/local/bin/

Expand All @@ -71,19 +73,21 @@ RUN mkdir /home/mpf; echo 'find_package(mpfCMakeHelpers REQUIRED)' > /home/mpf/C
COPY --from=openmpf_build /build-artifacts/mpf-sdk-install/include /home/mpf/mpf-sdk-install/include
COPY --from=openmpf_build /build-artifacts/mpf-sdk-install/lib /home/mpf/mpf-sdk-install/lib

RUN echo '/opt/opencv-4.9.0/lib' > /etc/ld.so.conf.d/opencv.conf; \
echo '/home/mpf/mpf-sdk-install/lib' > /etc/ld.so.conf.d/mpf.conf; \
RUN <<eot
echo '/opt/opencv-4.13.0/lib' > /etc/ld.so.conf.d/opencv.conf
echo '/home/mpf/mpf-sdk-install/lib' > /etc/ld.so.conf.d/mpf.conf
ldconfig
eot

COPY cpp_component_build/scripts /scripts

ENV PATH /scripts:$PATH
ENV PATH=/scripts:$PATH

ENV CMAKE_PREFIX_PATH /home/mpf/mpf-sdk-install/lib/cmake
ENV CMAKE_PREFIX_PATH=/home/mpf/mpf-sdk-install/lib/cmake

ENV BUILD_DIR /home/mpf/component_build
ENV BUILD_DIR=/home/mpf/component_build

ENV SRC_DIR /home/mpf/component_src
ENV SRC_DIR=/home/mpf/component_src

WORKDIR $SRC_DIR

Expand Down
48 changes: 15 additions & 33 deletions components/cpp_executor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -31,7 +31,7 @@ ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_build:${BUILD_TAG} AS openmpf_build


FROM ubuntu:20.04 AS common
FROM ubuntu:24.04 AS common

SHELL ["/bin/bash", "-o", "errexit", "-o", "pipefail", "-c"]

Expand All @@ -40,35 +40,18 @@ ENV LC_ALL=C.UTF-8

RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/tmp \
apt-get update; \
apt-get upgrade -y; \
apt-get install --no-install-recommends -y wget ca-certificates gnupg2; \
# Can't set up cuda repo at the beginning because it requires wget ca-certificates gnupg2
wget -O- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub \
| apt-key add -; \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" \
> /etc/apt/sources.list.d/cuda.list; \
apt-get update; \
apt-get install -y --no-install-recommends cuda-cudart-11-4;


COPY --from=openmpf_build \
/usr/local/bin/python3.12 /usr/local/bin/python3.12-config \
/usr/local/bin/pip3.12 /usr/local/bin/pip3 \
/usr/local/bin/

COPY --from=openmpf_build /usr/local/lib/python3.12 /usr/local/lib/python3.12

COPY --from=openmpf_build /usr/local/lib/libpython3.12.so.1.0 /usr/local/lib/

RUN <<eot
cd /usr/local/bin
ln --symbolic python3.12 python3
ln --symbolic python3.12-config python3-config
cd /usr/local/lib
ln --symbolic libpython3.12.so.1.0 libpython3.12.so
ln --symbolic /usr/local/lib/libpython3.12.so.1.0 /lib/x86_64-linux-gnu/libpython3.12.so.1.0
--mount=type=tmpfs,target=/tmp <<eot
apt-get update
apt-get upgrade -y
apt-get install --no-install-recommends -y wget ca-certificates gnupg2 python3 libpython3.12t64

# Can not set up cuda repo at the beginning because it requires wget ca-certificates gnupg2
wget -O- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub \
| apt-key add -
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" \
> /etc/apt/sources.list.d/cuda.list
apt-get update
apt-get install -y --no-install-recommends cuda-cudart-12-9
eot

COPY --from=openmpf_build /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /usr/local/bin/
Expand Down Expand Up @@ -103,7 +86,7 @@ COPY --from=openmpf_build /build-artifacts/install/bin/amq_detection_component \
COPY --from=openmpf_build /build-artifacts/install/config/Log4cxxConfig.xml $MPF_HOME/config/

COPY --from=openmpf_build /build-artifacts/install/lib/mpf_cpp_sdk.cpython-312-x86_64-linux-gnu.so \
/usr/local/lib/python3.12/lib-dynload/
/usr/lib/python3.12/lib-dynload

COPY --from=openmpf_build /scripts/* /scripts/

Expand All @@ -115,7 +98,6 @@ ENV BUILD_DIR=/home/mpf/component_build

ENV PLUGINS_DIR=$MPF_HOME/plugins


COPY docker-entrypoint.sh component-executor.py /scripts/

COPY cli_runner/*.py cli_runner/Log4cxxConfig.xml /scripts/cli_runner/
Expand Down
13 changes: 7 additions & 6 deletions components/java_component_build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -31,7 +31,7 @@ ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_build:${BUILD_TAG} AS openmpf_build


FROM ubuntu:20.04
FROM ubuntu:24.04

SHELL ["/bin/bash", "-o", "errexit", "-o", "pipefail", "-c"]

Expand All @@ -40,11 +40,12 @@ ENV LC_ALL=C.UTF-8

RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/tmp \
apt-get update; \
apt-get upgrade -y; \
--mount=type=tmpfs,target=/tmp <<eot
apt-get update
apt-get upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
openjdk-17-jdk-headless wget ca-certificates;
openjdk-25-jdk-headless wget ca-certificates
eot

COPY --from=openmpf_build /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /usr/local/bin/

Expand Down
30 changes: 7 additions & 23 deletions components/java_executor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.20

#############################################################################
# NOTICE #
Expand Down Expand Up @@ -31,7 +31,7 @@ ARG BUILD_TAG=latest
FROM ${BUILD_REGISTRY}openmpf_build:${BUILD_TAG} AS openmpf_build


FROM ubuntu:20.04
FROM ubuntu:24.04

SHELL ["/bin/bash", "-o", "errexit", "-o", "pipefail", "-c"]

Expand All @@ -40,27 +40,11 @@ ENV LC_ALL=C.UTF-8

RUN --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=tmpfs,target=/var/lib/apt/lists \
--mount=type=tmpfs,target=/tmp \
apt-get update; \
apt-get upgrade -y; \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y openjdk-17-jre-headless;

COPY --from=openmpf_build \
/usr/local/bin/python3.12 /usr/local/bin/python3.12-config \
/usr/local/bin/pip3.12 /usr/local/bin/pip3 \
/usr/local/bin/

COPY --from=openmpf_build /usr/local/lib/python3.12 /usr/local/lib/python3.12

COPY --from=openmpf_build /usr/local/lib/libpython3.12.so.1.0 /usr/local/lib/

RUN <<eot
cd /usr/local/bin
ln --symbolic python3.12 python3
ln --symbolic python3.12-config python3-config
cd /usr/local/lib
ln --symbolic libpython3.12.so.1.0 libpython3.12.so
ln --symbolic /usr/local/lib/libpython3.12.so.1.0 /lib/x86_64-linux-gnu/libpython3.12.so.1.0
--mount=type=tmpfs,target=/tmp <<eot
apt-get update
apt-get upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
openjdk-25-jre-headless python3
eot

COPY --from=openmpf_build /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /usr/local/bin/
Expand Down
Loading