1
0

Updated to latest xe-solutions base

Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James Ketrenos 2019-11-13 11:51:10 -08:00
parent 8a9be3721e
commit d9c9978faf
7 changed files with 86 additions and 28 deletions

View File

@ -14,8 +14,8 @@
#
# Template from templates/ubuntu/00-FROM.in
#
# Pull from the internal cache of images
FROM amr-registry.caas.intel.com/vtt-osgc/os/ubuntu:disco AS base
# Pull from ubuntu on Docker Hub
FROM ubuntu:disco AS base
#
@ -111,6 +111,41 @@ RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/u
#RUN apt-get remove -y wget
#
# Template from templates/ubuntu/20-repositories-intel-com.in
#
FROM base AS pre-user
# Once we have a signed repository:
#
# Update and install gpg-agent as it isn't in the base Ubuntu image and
# is needed for apt-key
#
#RUN apt-get -q update \
# && DEBIAN_FRONTEND=noninteractive \
# apt-get --no-install-recommends -q -y install \
# wget \
# gpg-agent \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
# Fetch and install the signing key for repositories.intel.com
#
#RUN wget --no-proxy --quiet -O /tmp/repositories.key ${PACKAGE_KEYFILE} \
# && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn \
# apt-key add /tmp/repositories.key \
# && rm /tmp/repositories.key
# Once the keys are being used, remove 'trusted=yes' from the repo line
# below:
# Install repository as trusted until we have a signed repository:
RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu disco main" > /etc/apt/sources.list.d/intel-graphics.list
# Cleanup
#RUN apt-get remove -y wget
#
# Template from templates/ubuntu/25-agama-user.in
#
@ -137,6 +172,32 @@ RUN groupadd -r agama \
# Set 'sudo' to NOPASSWD for all container users
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
#
# Template from templates/ubuntu/25-graphics-user.in
#
# Create user 'graphics' and add them to 'sudo' for sudo access and set
# the passwd to 'graphics'
FROM graphics AS user-stage
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
# NOTE: Requires 'sudo' package to already be installed
RUN groupadd -r graphics \
&& useradd --no-log-init \
-s /bin/bash \
-r -m \
-g graphics \
-G sudo \
-p $(echo "graphics" | openssl passwd -stdin) graphics
# Set 'sudo' to NOPASSWD for all container users
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
#
# Solution begins here (from Dockerfile.solution)
#
@ -149,7 +210,7 @@ RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
# image isn't polluted with build artifacts
#
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
FROM agama-user AS solution-build
FROM user-stage AS solution-build
# Install git and build tools, clone ffmpeg, and get ready to build it
RUN apt-get update \
@ -158,7 +219,7 @@ RUN apt-get update \
# Clone ffmpeg
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
RUN git clone --depth 1 --branch n4.2.1 https://github.com/ffmpeg/ffmpeg /home/agama/ffmpeg
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/graphics/ffmpeg
# Install all required common packages:
RUN apt-get update \
@ -173,17 +234,17 @@ RUN apt-get update \
ENV LIBVA_DRIVER_NAME=iHD
# Build FFmpeg
WORKDIR /home/agama/ffmpeg
WORKDIR /home/graphics/ffmpeg
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
&& make -j $(nproc --all) \
&& make install
FROM agama-user
FROM user-stage
ENV LIBVA_DRIVER_NAME=iHD
# Update and install the Mesa, OpenCL, and Media from Agama
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
#
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
# so explicitly install it.
@ -201,7 +262,7 @@ RUN apt-get -q update \
# Copy ffmpeg and ffprobe from build container
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
WORKDIR /home/agama
WORKDIR /home/graphics
#
# Standard ending begins here (from templates/ending.in)

View File

@ -7,7 +7,7 @@
# image isn't polluted with build artifacts
#
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
FROM agama-user AS solution-build
FROM user-stage AS solution-build
# Install git and build tools, clone ffmpeg, and get ready to build it
RUN apt-get update \
@ -16,7 +16,7 @@ RUN apt-get update \
# Clone ffmpeg
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/agama/ffmpeg
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/graphics/ffmpeg
# Install all required common packages:
RUN apt-get update \
@ -31,17 +31,17 @@ RUN apt-get update \
ENV LIBVA_DRIVER_NAME=iHD
# Build FFmpeg
WORKDIR /home/agama/ffmpeg
WORKDIR /home/graphics/ffmpeg
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
&& make -j $(nproc --all) \
&& make install
FROM agama-user
FROM user-stage
ENV LIBVA_DRIVER_NAME=iHD
# Update and install the Mesa, OpenCL, and Media from Agama
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
#
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
# so explicitly install it.
@ -59,4 +59,4 @@ RUN apt-get -q update \
# Copy ffmpeg and ffprobe from build container
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
WORKDIR /home/agama
WORKDIR /home/graphics

View File

@ -6,7 +6,7 @@
# image isn't polluted with build artifacts
#
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
FROM agama-user AS solution-build
FROM user-stage AS solution-build
# Install git and build tools, clone ffmpeg, and get ready to build it
RUN dnf groupinstall -y 'Development Tools'
@ -32,11 +32,11 @@ RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
&& make -j $(nproc --all) \
&& make install
FROM agama-user
FROM user-stage
ENV LIBVA_DRIVER_NAME=iHD
# Update and install the Mesa, OpenCL, and Media from Agama
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
#
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
# so explicitly install it.

View File

@ -1 +1 @@
AGAMA_VERSION="N/A"
RELEASE_INFO="N/A"

View File

@ -1,11 +1,9 @@
FFMPEG_TAG_VERSION=n4.2.1
REGISTRY_URL=${REGISTRY_URL:-amr-registry.caas.intel.com/vtt-osgc/solutions}
RELEASE_INFO=${RELEASE_INFO:-N/A}
REPO_URL=${REPO_URL:-amr-registry.caas.intel.com/vtt-osgc/solutions}
CONTAINER=$(basename ${PWD})
CONTAINER="intel-media-ffmpeg"
OS_DISTRO=${OS_DISTRO:-ubuntu}
OS_RELEASE=${OS_RELEASE:-disco}
PACKAGE_STREAM=${PACKAGE_STREAM:-${OS_RELEASE}}
#PACKAGE_STREAM=${PACKAGE_STREAM:-${OS_RELEASE}-devel}
PACKAGE_REPOSITORY=${PACKAGE_REPOSITORY:-https://repositories.intel.com/graphics}
#PACKAGE_KEYFILE=https://repositories.intel.com/graphics/repository.key
#PACKAGE_KEYFILE=${PACKAGE_KEYFILE:-https://repositories.intel.com/graphics/repository.key

View File

@ -1,4 +1,4 @@
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS agama-user
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS user-stage
# Configure DNF and YUM proxies
RUN echo "proxy=http://proxy-chain.intel.com:911" >> /etc/dnf/dnf.conf \
@ -170,8 +170,7 @@ RUN dnf clean all \
&& dnf -y upgrade \
&& dnf clean all
# Agama specific content begins here
#
# repositories.intel.com specific content begins here
#
# Intel certificates which would allow internal signed certs to be
# used are not being installed, so turn sslverify=0 on the

View File

@ -1,3 +1,3 @@
# Pull from the internal cache of images
FROM amr-registry.caas.intel.com/vtt-osgc/os/$OS_DISTRO:$OS_RELEASE AS base
# Pull from $OS_DISTRO on Docker Hub
FROM $OS_DISTRO:$OS_RELEASE AS base