Skip to content

Commit

Permalink
Add ubuntu 18.04 dockerfile for Q3 release
Browse files Browse the repository at this point in the history
Includes libva/libva-utils/gmm/media-driver/MediaSDK

Change-Id: I02a707eb9b3ae7e5c11efccbe57ca5d289b4119e
  • Loading branch information
Sherry-Lin committed Oct 1, 2018
1 parent 3377dd5 commit 00f9ae5
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export LIBVA_DRIVER_NAME=iHD

## Docker Image

To simplify media stack installation you can use docker images. They are located in [hub.docker/intelmediadriver](https://hub.docker.com/r/intelmediadriver/media-driver/tags/). Latest image is based on Ubuntu 18.04 and downloaded by below command.
To simplify media stack installation you can use docker images. To generate your own docker image, read Tools/dockers/README.md. Alternatively you can use generated images located in [hub.docker/intelmediadriver](https://hub.docker.com/r/intelmediadriver/media-driver/tags/). Latest image is based on Ubuntu 18.04 and downloaded by below command.
```
$ docker pull intelmediadriver/media-driver
```
Expand Down
29 changes: 29 additions & 0 deletions Tools/dockers/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Intel(R) Media Driver Docker Image


## Introduction

Docker files in the child folders are intended to provide latest validated media stack for operating systems disclosed in a folder names. Thus, you can see that media stack ingredients are checked out by specific revision, not by the latest head.


## Prerequisites

Install docker environment in your machine.


## Docker Image Tag

Latest tag is based on Ubuntu/18.04/Dockerfile. Ubuntu 16.04/Fedora28 images are in plan which are located under dockers/<OS>/<version>. You can submit issue to request other docker images you need.

Starting from 18.3 release branch, Release-<branch_name>_<base_image> tag are also avilable for download.

You can find detail tags from [hub.docker/intelmediadriver](https://hub.docker.com/r/intelmediadriver/media-driver/tags/).


## Build Dockerfile

To customize the docker image, you can build it like below after changing Dockerfile.
```
$ cd Tools/dockers/<OS>/<version>
$ docker build -t test:v1 .
```
97 changes: 97 additions & 0 deletions Tools/dockers/ubuntu/18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
FROM ubuntu:18.04

ENV DEBIAN_FRONTEND noninteractive
ENV LIBVA_VERSION 2.3.0
ENV LIBVAUTILS_VERSION 2.3.0
ENV MEDIADRIVER_VERSION intel-media-18.3.0
ENV GMMLIB_VERSION intel-gmmlib-18.3.0
ENV MSDK_VERSION intel-mediasdk-18.3.0


RUN apt-get update && \
apt-get install -y \
autoconf \
git \
curl \
libdrm-dev \
libgl1-mesa-glx \
libgl1-mesa-dev \
libtool \
libx11-dev \
openbox \
unzip \
xorg \
xorg-dev \
&& apt-get clean all

RUN mkdir /opt/src && \
cd /opt/src && \
curl -sSLO https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh && \
sh cmake-3.8.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir && \
rm cmake-3.8.2-Linux-x86_64.sh

RUN cd /opt/src && \
curl -sSLO https://www.samba.org/ftp/ccache/ccache-3.2.8.tar.bz2 && \
tar xf ccache-3.2.8.tar.bz2 && \
cd ccache-3.2.8 && \
./configure --prefix=/usr && \
make && \
make install

RUN mkdir -p /usr/lib/ccache && \
cd /usr/lib/ccache && \
ln -sf /usr/bin/ccache gcc && \
ln -sf /usr/bin/ccache g++ && \
ln -sf /usr/bin/ccache cc && \
ln -sf /usr/bin/ccache c++ && \
ln -sf /usr/bin/ccache clang && \
ln -sf /usr/bin/ccache clang++ && \
ln -sf /usr/bin/ccache clang-4.0 && \
ln -sf /usr/bin/ccache clang++-4.0

RUN cd /opt/src && \
curl -o libva.zip -sSL https://github.com/intel/libva/archive/${LIBVA_VERSION}.zip && \
unzip libva.zip && \
cd libva-${LIBVA_VERSION} && \
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu && \
make -j8 && \
make install

RUN cd /opt/src && \
curl -o gmmlib.zip -sSL https://github.com/intel/gmmlib/archive/${GMMLIB_VERSION}.zip && \
unzip gmmlib.zip && \
mkdir build_gmmlib && \
cd build_gmmlib && \
cmake ../gmmlib-${GMMLIB_VERSION} && \
make -j8 && \
make install

RUN cd /opt/src && \
curl -o media-driver.zip -sSL https://github.com/intel/media-driver/archive/${MEDIADRIVER_VERSION}.zip && \
unzip media-driver.zip && \
mkdir build_media && \
cd build_media && \
cmake ../media-driver-${MEDIADRIVER_VERSION} && \
make -j8 && \
make install

RUN cd /opt/src && \
curl -o libva-utils.zip -sSL https://github.com/intel/libva-utils/archive/${LIBVAUTILS_VERSION}.zip && \
unzip libva-utils.zip && \
cd libva-utils-${LIBVAUTILS_VERSION} && \
./autogen.sh && \
./configure --prefix=/usr && \
make -j8 && \
make install && \
make check

RUN cd /opt/src && \
curl -o msdk.zip -sSL https://github.com/Intel-Media-SDK/MediaSDK/archive/${MSDK_VERSION}.zip && \
unzip msdk.zip && \
mkdir build_msdk && \
cd build_msdk && \
cmake ../MediaSDK-${MSDK_VERSION} && \
make -j8 && \
make install

ADD ubuntu_export.sh /opt/src/ubuntu_export.sh
2 changes: 2 additions & 0 deletions Tools/dockers/ubuntu/18.04/ubuntu_export.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
export LIBVA_DRIVER_NAME=iHD

0 comments on commit 00f9ae5

Please sign in to comment.