<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Intel NEO operation on docker container in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Intel-NEO-operation-on-docker-container/m-p/1154342#M6155</link>
    <description>&lt;P&gt;I am running some opencl programs inside a docker container. To test the environment I am running clinfo as an entry point for the container. But it is not detecting NEO platforms.&lt;/P&gt;&lt;P&gt;Googling shows that other opencl targets require the docker container to be called with a device argument pointing to /dev/dri:&lt;/P&gt;&lt;P&gt;docker run --device=/dev/dri &amp;lt;image&amp;gt; clinfo&lt;/P&gt;&lt;P&gt;but I am not sure that this is what is require for intel devices.&lt;/P&gt;&lt;P&gt;I can get access to the CPU opencl device after installing the CPU opencl driver.&lt;/P&gt;&lt;P&gt;My Dockerfile is below which is called from a directory with the following structure:&lt;/P&gt;&lt;P&gt;Dockerfile&lt;/P&gt;&lt;P&gt;neo /&amp;lt;neo .deb files and firmware .bin files&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;opencl cpu drivers for intel&amp;gt;&lt;/P&gt;&lt;P&gt;Dockerfile:&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;FROM ubuntu:16.04

# ROS
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    python-rosinstall \
    liblua5.2 \
    libeigen3-dev \
    libsuitesparse-dev \
    liblog4cxx10v5 \
    python-yaml \
    libcairo2 \
    gfortran \
    libhdf5-serial-dev \
    libpcl-dev \
    libpcap0.8 \
    libatlas-base-dev \
    libarpack2 \
    libblas3 \
    libboost-filesystem1.58.0 \
    libboost-iostreams1.58.0 \
    libboost-program-options1.58.0 \
    libboost-python1.58.0 \
    libboost-system1.58.0 \
    libboost-thread1.58.0 \
    libboost-timer1.58.0 \
    libc6 \
    libcairo2 \
    libcholmod3.0.6 \
    libconsole-bridge0.2v5 \
    libgcc1 \
    libgflags2v5 \
    libgfortran3 \
    libgomp1 \
    libgoogle-glog0v5 \
    libhdf5-10 \
    libhdf5-cpp-11 \
    liblapack3 \
    liblog4cxx10v5 \
    liblua5.2-0 \
    libmetis5 \
    libnlopt0 \
    libogre-1.9.0v5 \
    libopenblas-base \
    libpcap0.8 \
    libpcl-common1.7 \
    libprotobuf9v5 \
    libpython2.7 \
    libspqr2.0.2 \
    libstdc++6 \
    libsz2 \
    liburdfdom-world0.4 \
    libwebp5 \
    libyaml-cpp0.5v5 \
    libyaml-0-2 \
    zlib1g \
    cython \
    exfat-fuse \
    python-psutil \
    python-requests \
    libgeotiff2 \
    iputils-ping \
    alien

# Other tooling
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    logrotate \
    git \
    vim \
   clinfo \
   dkms \
   ocl-icd-opencl-dev

# OpenCL for CPU and GPU
ARG INTEL_DRIVER=opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
ARG INTEL_DRIVER_URL=http://registrationcenter-download.intel.com/akdlm/irc_nas/9019

RUN mkdir -p /tmp/opencl-driver-intel
WORKDIR /tmp/opencl-driver-intel
COPY opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz .
COPY neo $WORKDIR
RUN mkdir -p /lib/firmware/intel &amp;amp;&amp;amp; dpkg -i *.deb &amp;amp;&amp;amp; cp *.bin /lib/firmware/intel &amp;amp;&amp;amp; rm *.deb &amp;amp;&amp;amp; rm *.bin
# SRB 5 uses a zip file; older drivers use .tgz
RUN echo INTEL_DRIVER is $INTEL_DRIVER; \
    
    if echo $INTEL_DRIVER | grep -q "[.]zip$"; then \
        unzip $INTEL_DRIVER; \
        mkdir fakeroot; \
        for f in intel-opencl-*.tar.xz; do tar -C fakeroot -Jxvf $f; done; \
        cp -R fakeroot/* /; \
        ldconfig; \
    else \
        tar -xzf $INTEL_DRIVER; \
        for i in $(basename $INTEL_DRIVER .tgz)/rpm/*.rpm; do alien --to-deb $i; done; \
        dpkg -i *.deb; \
        rm -rf $INTEL_DRIVER $(basename $INTEL_DRIVER .tgz) *.deb; \
        mkdir -p /etc/OpenCL/vendors; \
        echo /opt/intel/*/lib64/libintelocl.so &amp;gt; /etc/OpenCL/vendors/intel.icd; \
    fi; \
rm -rf /tmp/opencl-driver-intel;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Feb 2019 02:09:07 GMT</pubDate>
    <dc:creator>milani__peter1</dc:creator>
    <dc:date>2019-02-18T02:09:07Z</dc:date>
    <item>
      <title>Intel NEO operation on docker container</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Intel-NEO-operation-on-docker-container/m-p/1154342#M6155</link>
      <description>&lt;P&gt;I am running some opencl programs inside a docker container. To test the environment I am running clinfo as an entry point for the container. But it is not detecting NEO platforms.&lt;/P&gt;&lt;P&gt;Googling shows that other opencl targets require the docker container to be called with a device argument pointing to /dev/dri:&lt;/P&gt;&lt;P&gt;docker run --device=/dev/dri &amp;lt;image&amp;gt; clinfo&lt;/P&gt;&lt;P&gt;but I am not sure that this is what is require for intel devices.&lt;/P&gt;&lt;P&gt;I can get access to the CPU opencl device after installing the CPU opencl driver.&lt;/P&gt;&lt;P&gt;My Dockerfile is below which is called from a directory with the following structure:&lt;/P&gt;&lt;P&gt;Dockerfile&lt;/P&gt;&lt;P&gt;neo /&amp;lt;neo .deb files and firmware .bin files&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;opencl cpu drivers for intel&amp;gt;&lt;/P&gt;&lt;P&gt;Dockerfile:&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;FROM ubuntu:16.04

# ROS
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    python-rosinstall \
    liblua5.2 \
    libeigen3-dev \
    libsuitesparse-dev \
    liblog4cxx10v5 \
    python-yaml \
    libcairo2 \
    gfortran \
    libhdf5-serial-dev \
    libpcl-dev \
    libpcap0.8 \
    libatlas-base-dev \
    libarpack2 \
    libblas3 \
    libboost-filesystem1.58.0 \
    libboost-iostreams1.58.0 \
    libboost-program-options1.58.0 \
    libboost-python1.58.0 \
    libboost-system1.58.0 \
    libboost-thread1.58.0 \
    libboost-timer1.58.0 \
    libc6 \
    libcairo2 \
    libcholmod3.0.6 \
    libconsole-bridge0.2v5 \
    libgcc1 \
    libgflags2v5 \
    libgfortran3 \
    libgomp1 \
    libgoogle-glog0v5 \
    libhdf5-10 \
    libhdf5-cpp-11 \
    liblapack3 \
    liblog4cxx10v5 \
    liblua5.2-0 \
    libmetis5 \
    libnlopt0 \
    libogre-1.9.0v5 \
    libopenblas-base \
    libpcap0.8 \
    libpcl-common1.7 \
    libprotobuf9v5 \
    libpython2.7 \
    libspqr2.0.2 \
    libstdc++6 \
    libsz2 \
    liburdfdom-world0.4 \
    libwebp5 \
    libyaml-cpp0.5v5 \
    libyaml-0-2 \
    zlib1g \
    cython \
    exfat-fuse \
    python-psutil \
    python-requests \
    libgeotiff2 \
    iputils-ping \
    alien

# Other tooling
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    logrotate \
    git \
    vim \
   clinfo \
   dkms \
   ocl-icd-opencl-dev

# OpenCL for CPU and GPU
ARG INTEL_DRIVER=opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
ARG INTEL_DRIVER_URL=http://registrationcenter-download.intel.com/akdlm/irc_nas/9019

RUN mkdir -p /tmp/opencl-driver-intel
WORKDIR /tmp/opencl-driver-intel
COPY opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz .
COPY neo $WORKDIR
RUN mkdir -p /lib/firmware/intel &amp;amp;&amp;amp; dpkg -i *.deb &amp;amp;&amp;amp; cp *.bin /lib/firmware/intel &amp;amp;&amp;amp; rm *.deb &amp;amp;&amp;amp; rm *.bin
# SRB 5 uses a zip file; older drivers use .tgz
RUN echo INTEL_DRIVER is $INTEL_DRIVER; \
    
    if echo $INTEL_DRIVER | grep -q "[.]zip$"; then \
        unzip $INTEL_DRIVER; \
        mkdir fakeroot; \
        for f in intel-opencl-*.tar.xz; do tar -C fakeroot -Jxvf $f; done; \
        cp -R fakeroot/* /; \
        ldconfig; \
    else \
        tar -xzf $INTEL_DRIVER; \
        for i in $(basename $INTEL_DRIVER .tgz)/rpm/*.rpm; do alien --to-deb $i; done; \
        dpkg -i *.deb; \
        rm -rf $INTEL_DRIVER $(basename $INTEL_DRIVER .tgz) *.deb; \
        mkdir -p /etc/OpenCL/vendors; \
        echo /opt/intel/*/lib64/libintelocl.so &amp;gt; /etc/OpenCL/vendors/intel.icd; \
    fi; \
rm -rf /tmp/opencl-driver-intel;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 02:09:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Intel-NEO-operation-on-docker-container/m-p/1154342#M6155</guid>
      <dc:creator>milani__peter1</dc:creator>
      <dc:date>2019-02-18T02:09:07Z</dc:date>
    </item>
    <item>
      <title>You can use this github</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Intel-NEO-operation-on-docker-container/m-p/1154343#M6156</link>
      <description>&lt;P&gt;You can use this&amp;nbsp;&lt;A href="https://github.com/JacekDanecki/neo-hub"&gt;github&lt;/A&gt;&amp;nbsp;repository as reference. Feel free to ask any additional&amp;nbsp;questions.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 09:20:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Intel-NEO-operation-on-docker-container/m-p/1154343#M6156</guid>
      <dc:creator>JACEK_D_Intel</dc:creator>
      <dc:date>2019-02-19T09:20:41Z</dc:date>
    </item>
  </channel>
</rss>

