# # Template begins here (from templates/templates/00-FROM.in) # # Creates a base OSGC Intel enabled Ubuntu image # # Derivatives include -dev variation which adds git, build-essentials, # source repos, etc. # FROM amr-registry.caas.intel.com/vtt-osgc/os/osgc-ubuntu:eoan # # Template begins here (from templates/templates/05-intel-proxy.in) # # Pre-install proxy configuration values # # This uses the linux-ftp.ostc.intel.com as a mirror. RUN echo "Acquire::http::proxy \"http://proxy-chain.intel.com:911/\";\n" \ "Acquire::https::proxy \"https://proxy-chain.intel.com:911/\";\n" \ "Acquire::ftp::proxy \"ftp://proxy-chain.intel.com:911/\";\n" \ "Acquire::socks::proxy \"socks://proxy-chain.intel.com:1080/\";\n" \ "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" \ "Acquire::http::Proxy::osgc.jf.intel.com DIRECT;\n" > /etc/apt/apt.conf # # Template begins here (from templates/templates/10-default-packages.in) # # Update the repo lists and then install things using the internal # sources. Packages used by many developers are pulled into this image # but we do want it to be relatively small. # # NOTE: We use DEBIAN_FRONTEND=noninteractive to prevent krb5-user from # trying to prompt for configuration details during install. RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install \ -y --no-install-recommends -q \ net-tools \ iputils-ping \ sudo \ wget \ locales \ software-properties-common # Set up locales RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 # # Template begins here (from templates/templates/20-create-agama-user.in) # # Create user 'agama' and add them to 'sudo' for sudo access and set # the passwd to 'agama' # # NOTE: Requires 'sudo' package to already be installed RUN groupadd -r agama \ && useradd --no-log-init \ -s /bin/bash \ -r -m \ -g agama \ -G sudo \ -p $(echo "agama" | openssl passwd -stdin) agama # Set 'sudo' to NOPASSWD for all container users RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers # # Template begins here (from templates/templates/25-install-agama.in) # # 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 \ gpg-agent # Fetch and install the signing key for OSGC's Agama repository RUN wget --no-proxy --quiet -O /tmp/aptly.key http://osgc.jf.intel.com/packages/agama/ubuntu/aptly_repo_signing.key \ && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key add /tmp/aptly.key \ && rm /tmp/aptly.key # Add internal Agama repository RUN apt-add-repository "deb [arch=amd64] http://osgc.jf.intel.com/packages/agama/ubuntu disco main" # Update and install the Mesa, OpenCL, and Media from Agama RUN apt-get -q update \ && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \ libgl1-mesa-glx=19.1.0.agama-109 libgl1-mesa-dri=19.1.0.agama-109 \ intel-opencl=19.32.109 \ intel-media=2.10.109 libva2=2.4.0.agama-109 \ ocl-icd-libopencl1 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # # Solution begins here (from Dockerfile.solution) # # Fetch build tools and source for clinfo, then build it # # This should really be part of a multi-stage build so the final # image isn't polluted with build artifacts # RUN apt-get update \ && apt-get remove -y clinfo \ && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \ git build-essential opencl-c-headers \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* WORKDIR /home/agama RUN git clone https://gitlab.devtools.intel.com/jketreno/clinfo.git \ && cd clinfo \ && make RUN DEBIAN_FRONTEND=noninteractive apt-get remove -q -y git build-essential opencl-c-headers CMD [ "/home/agama/clinfo/clinfo" ]