Merge branch '2-refactor-build-process' into 'master'
Resolve "Refactor to match documented build process" Closes #2 See merge request vtt/sws/osgc/solutions/intel-media-ffmpeg!1
This commit is contained in:
commit
20afbd66a2
28
.gitlab-ci.yml
Normal file
28
.gitlab-ci.yml
Normal file
@ -0,0 +1,28 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
build_image:
|
||||
stage: build
|
||||
script:
|
||||
- make
|
||||
after_script:
|
||||
- ./scripts/clean-image.sh
|
||||
tags:
|
||||
- builder
|
||||
- ubuntu
|
||||
- IVB
|
||||
only:
|
||||
- triggers
|
||||
|
||||
test_image_devel:
|
||||
stage: test
|
||||
script:
|
||||
- ./scripts/devel-test.sh
|
||||
after_script:
|
||||
- ./scripts/clean-image.sh
|
||||
tags:
|
||||
- gen9
|
||||
only:
|
||||
- triggers
|
||||
|
@ -21,10 +21,10 @@ RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/f
|
||||
# Install all required common packages:
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
|
||||
libva-dev=$LIBVA_DEV_VERSION \
|
||||
libmfx-dev=$LIBMFX_DEV_VERSION \
|
||||
libmfx1=$LIBMFX1_VERSION \
|
||||
vainfo=$VAINFO_VERSION \
|
||||
libva-dev$LIBVA_DEV_VERSION \
|
||||
libmfx-dev$LIBMFX_DEV_VERSION \
|
||||
libmfx1$LIBMFX1_VERSION \
|
||||
vainfo$VAINFO_VERSION \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -47,11 +47,11 @@ ENV LIBVA_DRIVER_NAME=iHD
|
||||
# so explicitly install it.
|
||||
RUN apt-get -q update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \
|
||||
intel-media-va-driver-non-free=$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
||||
libigdgmm11=$LIBIGDGMM11_VERSION \
|
||||
libva2=$LIBVA2_VERSION \
|
||||
libmfx1=$LIBMFX1_VERSION \
|
||||
vainfo=$VAINFO_VERSION \
|
||||
intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
||||
libigdgmm11$LIBIGDGMM11_VERSION \
|
||||
libva2$LIBVA2_VERSION \
|
||||
libmfx1$LIBMFX1_VERSION \
|
||||
vainfo$VAINFO_VERSION \
|
||||
libpciaccess0 \
|
||||
pciutils \
|
||||
&& apt-get clean \
|
||||
|
110
MANIFEST
110
MANIFEST
@ -1,55 +1,55 @@
|
||||
AGAMA_VERSION=196
|
||||
INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION=19.3.pre4.agama-196
|
||||
INTEL_OPENCL_ICD_VERSION=19.37.14191.agama-196
|
||||
LIBD3DADAPTER9_MESA_VERSION=19.1.0.agama-196
|
||||
LIBD3DADAPTER9_MESA_DEV_VERSION=19.1.0.agama-196
|
||||
LIBEGL_MESA0_VERSION=19.1.0.agama-196
|
||||
LIBEGL1_MESA_VERSION=19.1.0.agama-196
|
||||
LIBEGL1_MESA_DEV_VERSION=19.1.0.agama-196
|
||||
LIBGBM_DEV_VERSION=19.1.0.agama-196
|
||||
LIBGBM1_VERSION=19.1.0.agama-196
|
||||
LIBGL1_MESA_DEV_VERSION=19.1.0.agama-196
|
||||
LIBGL1_MESA_DRI_VERSION=19.1.0.agama-196
|
||||
LIBGL1_MESA_GLX_VERSION=19.1.0.agama-196
|
||||
LIBGLAPI_MESA_VERSION=19.1.0.agama-196
|
||||
LIBGLES2_MESA_VERSION=19.1.0.agama-196
|
||||
LIBGLES2_MESA_DEV_VERSION=19.1.0.agama-196
|
||||
LIBGLX_MESA0_VERSION=19.1.0.agama-196
|
||||
LIBIGC_DEV_VERSION=1.0.11.agama-196
|
||||
LIBIGC_TOOLS_VERSION=1.0.11.agama-196
|
||||
LIBIGC1_VERSION=1.0.11.agama-196
|
||||
LIBIGDFCL_DEV_VERSION=1.0.11.agama-196
|
||||
LIBIGDFCL1_VERSION=1.0.11.agama-196
|
||||
LIBIGDGMM_DEV_VERSION=19.3.2.agama-196
|
||||
LIBIGDGMM11_VERSION=19.3.2.agama-196
|
||||
LIBIGFXCMRT_DEV_VERSION=19.3.pre4.agama-196
|
||||
LIBIGFXCMRT7_VERSION=19.3.pre4.agama-196
|
||||
LIBMFX_DEV_VERSION=19.2.pre3.agama-196
|
||||
LIBMFX_TOOLS_VERSION=19.2.pre3.agama-196
|
||||
LIBMFX1_VERSION=19.2.pre3.agama-196
|
||||
LIBOPENCL_CLANG_DEV_VERSION=8.0.0.agama-196
|
||||
LIBOPENCL_CLANG8_VERSION=8.0.0.agama-196
|
||||
LIBOSMESA6_VERSION=19.1.0.agama-196
|
||||
LIBOSMESA6_DEV_VERSION=19.1.0.agama-196
|
||||
LIBVA_DEV_VERSION=2.6.0.agama-196
|
||||
LIBVA_DRM2_VERSION=2.6.0.agama-196
|
||||
LIBVA_GLX2_VERSION=2.6.0.agama-196
|
||||
LIBVA_WAYLAND2_VERSION=2.6.0.agama-196
|
||||
LIBVA_X11_2_VERSION=2.6.0.agama-196
|
||||
LIBVA2_VERSION=2.6.0.agama-196
|
||||
LIBWAFFLE_1_0_VERSION=1.6.90.agama-196
|
||||
LIBWAFFLE_DEV_VERSION=1.6.90.agama-196
|
||||
LIBWAFFLE_DOC_VERSION=1.6.90.agama-196
|
||||
LIBWAYLAND_EGL1_MESA_VERSION=19.1.0.agama-196
|
||||
LIBXATRACKER_DEV_VERSION=19.1.0.agama-196
|
||||
LIBXATRACKER2_VERSION=19.1.0.agama-196
|
||||
MESA_COMMON_DEV_VERSION=19.1.0.agama-196
|
||||
MESA_OPENCL_ICD_VERSION=19.1.0.agama-196
|
||||
MESA_VA_DRIVERS_VERSION=19.1.0.agama-196
|
||||
MESA_VDPAU_DRIVERS_VERSION=19.1.0.agama-196
|
||||
MESA_VULKAN_DRIVERS_VERSION=19.1.0.agama-196
|
||||
PIGLIT_VERSION=1.0.20190905.agama-196
|
||||
PIGLIT_SHARDS_VERSION=20191007.agama-196
|
||||
VA_DRIVER_ALL_VERSION=2.6.0.agama-196
|
||||
VAINFO_VERSION=2.6.0.agama-196
|
||||
WAFFLE_UTILS_VERSION=1.6.90.agama-196
|
||||
AGAMA_VERSION=194
|
||||
INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION==19.3.pre4.agama-194
|
||||
INTEL_OPENCL_ICD_VERSION==19.37.14191.agama-194
|
||||
LIBD3DADAPTER9_MESA_VERSION==19.1.0.agama-194
|
||||
LIBD3DADAPTER9_MESA_DEV_VERSION==19.1.0.agama-194
|
||||
LIBEGL_MESA0_VERSION==19.1.0.agama-194
|
||||
LIBEGL1_MESA_VERSION==19.1.0.agama-194
|
||||
LIBEGL1_MESA_DEV_VERSION==19.1.0.agama-194
|
||||
LIBGBM_DEV_VERSION==19.1.0.agama-194
|
||||
LIBGBM1_VERSION==19.1.0.agama-194
|
||||
LIBGL1_MESA_DEV_VERSION==19.1.0.agama-194
|
||||
LIBGL1_MESA_DRI_VERSION==19.1.0.agama-194
|
||||
LIBGL1_MESA_GLX_VERSION==19.1.0.agama-194
|
||||
LIBGLAPI_MESA_VERSION==19.1.0.agama-194
|
||||
LIBGLES2_MESA_VERSION==19.1.0.agama-194
|
||||
LIBGLES2_MESA_DEV_VERSION==19.1.0.agama-194
|
||||
LIBGLX_MESA0_VERSION==19.1.0.agama-194
|
||||
LIBIGC_DEV_VERSION==1.0.11.agama-194
|
||||
LIBIGC_TOOLS_VERSION==1.0.11.agama-194
|
||||
LIBIGC1_VERSION==1.0.11.agama-194
|
||||
LIBIGDFCL_DEV_VERSION==1.0.11.agama-194
|
||||
LIBIGDFCL1_VERSION==1.0.11.agama-194
|
||||
LIBIGDGMM_DEV_VERSION==19.3.2.agama-194
|
||||
LIBIGDGMM11_VERSION==19.3.2.agama-194
|
||||
LIBIGFXCMRT_DEV_VERSION==19.3.pre4.agama-194
|
||||
LIBIGFXCMRT7_VERSION==19.3.pre4.agama-194
|
||||
LIBMFX_DEV_VERSION==19.2.pre3.agama-194
|
||||
LIBMFX_TOOLS_VERSION==19.2.pre3.agama-194
|
||||
LIBMFX1_VERSION==19.2.pre3.agama-194
|
||||
LIBOPENCL_CLANG_DEV_VERSION==8.0.0.agama-194
|
||||
LIBOPENCL_CLANG8_VERSION==8.0.0.agama-194
|
||||
LIBOSMESA6_VERSION==19.1.0.agama-194
|
||||
LIBOSMESA6_DEV_VERSION==19.1.0.agama-194
|
||||
LIBVA_DEV_VERSION==2.6.0.agama-194
|
||||
LIBVA_DRM2_VERSION==2.6.0.agama-194
|
||||
LIBVA_GLX2_VERSION==2.6.0.agama-194
|
||||
LIBVA_WAYLAND2_VERSION==2.6.0.agama-194
|
||||
LIBVA_X11_2_VERSION==2.6.0.agama-194
|
||||
LIBVA2_VERSION==2.6.0.agama-194
|
||||
LIBWAFFLE_1_0_VERSION==1.6.90.agama-194
|
||||
LIBWAFFLE_DEV_VERSION==1.6.90.agama-194
|
||||
LIBWAFFLE_DOC_VERSION==1.6.90.agama-194
|
||||
LIBWAYLAND_EGL1_MESA_VERSION==19.1.0.agama-194
|
||||
LIBXATRACKER_DEV_VERSION==19.1.0.agama-194
|
||||
LIBXATRACKER2_VERSION==19.1.0.agama-194
|
||||
MESA_COMMON_DEV_VERSION==19.1.0.agama-194
|
||||
MESA_OPENCL_ICD_VERSION==19.1.0.agama-194
|
||||
MESA_VA_DRIVERS_VERSION==19.1.0.agama-194
|
||||
MESA_VDPAU_DRIVERS_VERSION==19.1.0.agama-194
|
||||
MESA_VULKAN_DRIVERS_VERSION==19.1.0.agama-194
|
||||
PIGLIT_VERSION==1.0.20190905.agama-194
|
||||
PIGLIT_SHARDS_VERSION==20191004.agama-194
|
||||
VA_DRIVER_ALL_VERSION==2.6.0.agama-194
|
||||
VAINFO_VERSION==2.6.0.agama-194
|
||||
WAFFLE_UTILS_VERSION==1.6.90.agama-194
|
10
Makefile
10
Makefile
@ -1,9 +1,7 @@
|
||||
.PHONY: all images
|
||||
all: build_ubuntu
|
||||
|
||||
all: Dockerfile
|
||||
.PHONY: all
|
||||
|
||||
Dockerfile: Dockerfile.solution templates/*.in SOLUTION MANIFEST
|
||||
build_ubuntu: Dockerfile.solution templates/*.in SOLUTION MANIFEST
|
||||
@scripts/build-dockerfile
|
||||
|
||||
images:
|
||||
@scripts/build-images
|
||||
@scripts/build-images
|
1
SOLUTION
1
SOLUTION
@ -1,3 +1,4 @@
|
||||
REPO_URL=amr-registry.caas.intel.com/vtt-osgc/solutions
|
||||
CONTAINER=intel-media-ffmpeg
|
||||
OS_DISTRO=ubuntu
|
||||
OS_RELEASE=disco
|
||||
|
@ -2,8 +2,15 @@
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
export $(grep -v '^#' SOLUTION | xargs -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | xargs -d '\n')
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
|
||||
# Remove the Dockerfile if it exists; should check
|
||||
# if it is clean first, and abort if not.
|
||||
|
@ -2,8 +2,15 @@
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
export $(grep -v '^#' SOLUTION | xargs -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | xargs -d '\n')
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
|
||||
docker build . -t ${CONTAINER}:agama-${AGAMA_VERSION} || {
|
||||
cat << EOM
|
||||
@ -15,8 +22,17 @@ EOM
|
||||
}
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${CONTAINER}
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${REPO_URL}/${CONTAINER}:devel
|
||||
docker push ${REPO_URL}/${CONTAINER}:devel
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat << EOM
|
||||
This image was pushed to the devel tag
|
||||
|
||||
amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel
|
||||
|
||||
If the build looks good, you should commit the changes
|
||||
to Dockerfile and tag it as agama-${AGAMA_VERSION}
|
||||
@ -29,11 +45,6 @@ To push to Harbor:
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
|
||||
If this is a build others might want, roll the 'devel' tag to it:
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel
|
||||
|
||||
If this is a good build, then roll the 'latest' tag to it.
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest
|
||||
|
14
scripts/clean-image.sh
Executable file
14
scripts/clean-image.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
docker rmi ${REPO_URL}/${CONTAINER}:devel
|
23
scripts/devel-test.sh
Executable file
23
scripts/devel-test.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
mkdir $(pwd)/media
|
||||
wget -O $(pwd)/media/AUD_MW_E.264 \
|
||||
https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
|
||||
docker run \
|
||||
--rm \
|
||||
-a STDOUT \
|
||||
--device=/dev/dri \
|
||||
-e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \
|
||||
--volume $(pwd)/media:/media \
|
||||
${REPO_URL}/${CONTAINER}:devel \
|
||||
test
|
Loading…
x
Reference in New Issue
Block a user