From 472913610aebcc6f21d37c1a9ca3d480c5064015 Mon Sep 17 00:00:00 2001 From: Simran Date: Tue, 27 Oct 2020 01:15:22 +0100 Subject: [PATCH] Docker: Add ci-otio image (#1278) This includes both, the Python and C++ version. We basically just need the headers and libopentime(line).so * Add label for VFXPLATFORM_VERSION * org.opencontainers.image.licenses defaults to GPL-2.0-only?! --- docker/ci-common/Dockerfile | 2 +- docker/ci-crashpad/Dockerfile | 2 +- docker/ci-ffmpeg/Dockerfile | 2 +- docker/ci-olive/Dockerfile | 5 ++- docker/ci-otio/Dockerfile | 58 +++++++++++++++++++++++++++++++++++ docker/scripts/build_otio.sh | 23 ++++++++++++++ 6 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 docker/ci-otio/Dockerfile create mode 100644 docker/scripts/build_otio.sh diff --git a/docker/ci-common/Dockerfile b/docker/ci-common/Dockerfile index ce97cc8c6..6bcbe31ef 100644 --- a/docker/ci-common/Dockerfile +++ b/docker/ci-common/Dockerfile @@ -21,13 +21,13 @@ ARG DTS_VERSION ARG CMAKE_VERSION LABEL maintainer="olivevideoeditor@gmail.com" - LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-common" LABEL org.opencontainers.image.description="CentOS CI Shared Image" LABEL org.opencontainers.image.url="http://olivevideoeditor.org" LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive" LABEL org.opencontainers.image.vendor="Olive Team" LABEL org.opencontainers.image.version="1.0" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" USER root diff --git a/docker/ci-crashpad/Dockerfile b/docker/ci-crashpad/Dockerfile index ad7edbe24..88d6cd6f5 100644 --- a/docker/ci-crashpad/Dockerfile +++ b/docker/ci-crashpad/Dockerfile @@ -13,13 +13,13 @@ ARG OLIVE_ORG ARG CI_COMMON_VERSION LABEL maintainer="olivevideoeditor@gmail.com" - LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-crashpad" LABEL org.opencontainers.image.description="CentOS Crashpad Build Image" LABEL org.opencontainers.image.url="http://olivevideoeditor.org" LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive" LABEL org.opencontainers.image.vendor="Olive Team" LABEL org.opencontainers.image.version="1.0" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" COPY scripts/build_crashpad.sh \ /tmp/ diff --git a/docker/ci-ffmpeg/Dockerfile b/docker/ci-ffmpeg/Dockerfile index 6333ba164..8a664ca02 100644 --- a/docker/ci-ffmpeg/Dockerfile +++ b/docker/ci-ffmpeg/Dockerfile @@ -27,13 +27,13 @@ ARG OPUS_VERSION ARG NUM_JOBS=2 LABEL maintainer="olivevideoeditor@gmail.com" - LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-ffmpeg" LABEL org.opencontainers.image.description="CentOS FFmpeg Build Image" LABEL org.opencontainers.image.url="http://olivevideoeditor.org" LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive" LABEL org.opencontainers.image.vendor="Olive Team" LABEL org.opencontainers.image.version="1.0" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" COPY scripts/build_ffmpeg.sh \ /tmp/ diff --git a/docker/ci-olive/Dockerfile b/docker/ci-olive/Dockerfile index 386aa98f8..09a2703d6 100644 --- a/docker/ci-olive/Dockerfile +++ b/docker/ci-olive/Dockerfile @@ -18,6 +18,7 @@ FROM ${ASWF_PKG_ORG}/ci-package-oiio:${VFXPLATFORM_VERSION} as ci-package-oiio FROM ${ASWF_PKG_ORG}/ci-package-ocio:${VFXPLATFORM_VERSION} as ci-package-ocio FROM ${OLIVE_ORG}/ci-package-ffmpeg:${FFMPEG_VERSION} as ci-package-ffmpeg FROM ${OLIVE_ORG}/ci-package-crashpad:latest as ci-package-crashpad +FROM ${OLIVE_ORG}/ci-package-otio:latest as ci-package-otio FROM ${OLIVE_ORG}/ci-common:${CI_COMMON_VERSION} as ci-olive @@ -26,13 +27,14 @@ ARG VFXPLATFORM_VERSION ARG PYTHON_VERSION=3.7 LABEL maintainer="olivevideoeditor@gmail.com" - +LABEL com.vfxplatform.version=$VFXPLATFORM_VERSION LABEL org.opencontainers.image.name="olivevideoeditor/ci-olive" LABEL org.opencontainers.image.description="CentOS CI Olive Build Image" LABEL org.opencontainers.image.url="http://olivevideoeditor.org" LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive" LABEL org.opencontainers.image.vendor="Olive Team" LABEL org.opencontainers.image.version="1.0" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" ENV PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH} \ CRASHPAD_LOCATION=/usr/local/crashpad \ @@ -46,6 +48,7 @@ COPY --from=ci-package-oiio /. /usr/local/ COPY --from=ci-package-ocio /. /usr/local/ COPY --from=ci-package-ffmpeg /. /usr/local/ COPY --from=ci-package-crashpad /. /usr/local/ +COPY --from=ci-package-otio /. /usr/local/ RUN curl --location "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" \ -o "/usr/local/linuxdeployqt-x86_64.AppImage" && \ diff --git a/docker/ci-otio/Dockerfile b/docker/ci-otio/Dockerfile new file mode 100644 index 000000000..22f086ada --- /dev/null +++ b/docker/ci-otio/Dockerfile @@ -0,0 +1,58 @@ +# Copyright (C) 2020 Olive Team +# SPDX-License-Identifier: GPL-3.0-or-later + +# Build image (default): +# docker build -t olivevideoeditor/ci-package-otio -f ci-otio/Dockerfile . + +ARG OLIVE_ORG=olivevideoeditor +ARG ASWF_PKG_ORG=aswftesting +ARG CI_COMMON_VERSION=2 +ARG VFXPLATFORM_VERSION=2021 + +FROM ${ASWF_PKG_ORG}/ci-package-python:${VFXPLATFORM_VERSION} as ci-package-python +FROM ${ASWF_PKG_ORG}/ci-package-qt:${VFXPLATFORM_VERSION} as ci-package-qt +FROM ${ASWF_PKG_ORG}/ci-package-pyside:${VFXPLATFORM_VERSION} as ci-package-pyside + +FROM ${OLIVE_ORG}/ci-common:${CI_COMMON_VERSION} as ci-otio + +ARG OLIVE_ORG +ARG VFXPLATFORM_VERSION +ARG PYTHON_VERSION=3.7 + +LABEL maintainer="olivevideoeditor@gmail.com" +LABEL com.vfxplatform.version=$VFXPLATFORM_VERSION +LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-otio" +LABEL org.opencontainers.image.description="CentOS OpenTimelineIO Build Image" +LABEL org.opencontainers.image.url="http://olivevideoeditor.org" +LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive" +LABEL org.opencontainers.image.vendor="Olive Team" +LABEL org.opencontainers.image.version="1.0" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" + +ENV OLIVE_ORG=${OLIVE_ORG} \ + CI_COMMON_VERSION=${CI_COMMON_VERSION} \ + VFXPLATFORM_VERSION=${VFXPLATFORM_VERSION} \ + PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:/usr/local/lib/python \ + OLIVE_INSTALL_PREFIX=/usr/local + +COPY scripts/base/install_cmake.sh \ + scripts/build_otio.sh \ + /tmp/ + +COPY --from=ci-package-python /. /usr/local/ +COPY --from=ci-package-qt /. /usr/local/ +COPY --from=ci-package-pyside /. /usr/local/ + +RUN export DOWNLOADS_DIR=/tmp/downloads && \ + mkdir /tmp/downloads && \ + /tmp/install_cmake.sh && \ + pip install flake8 tox urllib3 && \ + rm -rf /tmp/downloads + +RUN /tmp/before_build.sh && \ + /tmp/build_otio.sh && \ + /tmp/copy_new_files.sh + +FROM scratch as ci-package-otio + +COPY --from=ci-otio /package/. / diff --git a/docker/scripts/build_otio.sh b/docker/scripts/build_otio.sh new file mode 100644 index 000000000..53039ef8d --- /dev/null +++ b/docker/scripts/build_otio.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright (C) 2020 Olive Team +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +git clone --depth 1 https://github.com/PixarAnimationStudios/OpenTimelineIO.git +cd OpenTimelineIO + +#if [ "$OTIO_VERSION" != "latest" ]; then +# git checkout "tags/v${OTIO_VERSION}" -b "v${OTIO_VERSION}" +#fi + +pip install --prefix="${OLIVE_INSTALL_PREFIX}" . + +mkdir build +cd build +cmake .. -G "Ninja" +cmake --build . +cmake --install . --prefix "${OLIVE_INSTALL_PREFIX}" + +cd ../.. +rm -rf OpenTimelineIO