├── README.md ├── beignet ├── 1.1.1 │ └── Dockerfile └── 1.1.2 │ └── Dockerfile ├── hashcat ├── beignet │ ├── v3.00 │ │ └── Dockerfile │ └── v3.10 │ │ └── Dockerfile └── intel │ └── v3.10 │ └── Dockerfile ├── intel └── 2016R2 │ └── Dockerfile └── mesa ├── 11.2.0 └── Dockerfile └── 12.0.1 └── Dockerfile /README.md: -------------------------------------------------------------------------------- 1 | # Docker images that support different OpenCL Runtime 2 | 3 | The images are designed to be easy tested applications with different OpenCL drivers/runtime. 4 | 5 | - Support x86_64/amd64 platform. 6 | - Ubuntu as based OS. 7 | 8 | ## Application 9 | 10 | [hashcat](https://hashcat.net/hashcat/) 11 | 12 | * [chihchun/hashcat-beignet](https://hub.docker.com/r/chihchun/hashcat-beignet/) 13 | * [chihchun/hashcat-intel](https://hub.docker.com/r/chihchun/hashcat-intel/) 14 | 15 | ## Supported OpenCL platform 16 | 17 | * Intel platform 18 | * [chihchun/opencl-beignet](https://hub.docker.com/r/chihchun/opencl-beignet/) 19 | 20 | Beignet is an open source implementation of the OpenCL specification - a generic compute oriented API. This code base contains the code to run OpenCL programs on Intel GPUs which basically defines and implements the OpenCL host functions required to initialize the device, create the command queues, the kernels and the programs and run them on the GPU. 21 | 22 | https://www.freedesktop.org/wiki/Software/Beignet/ 23 | 24 | * [chihchun/opencl-intel](https://hub.docker.com/r/chihchun/opencl-intel/) 25 | 26 | Intel® SDK for OpenCL™ Applications 2016 R2 for Linux* (64 bit) 27 | OpenCL™ 2.0 Driver for Intel® HD, Iris™, and Iris™ Pro Graphics for Linux* (64-bit) 28 | https://software.intel.com/en-us/articles/opencl-drivers 29 | 30 | * AMD/ATI Radeon (not tested) 31 | * [chihchun/opencl-mesa](https://hub.docker.com/r/chihchun/opencl-mesa/) 32 | 33 | Mesa (Gallium) https://dri.freedesktop.org/wiki/GalliumCompute/ 34 | 35 | * Nvidia (TBD) 36 | 37 | ## Usage 38 | 39 | You need to expose the /dev/dri to the docker container, in order to let the runtime access to the GPU kernel interface. 40 | 41 | $ docker run -t -i --device /dev/dri:/dev/dri chihchun/opencl-beignet:1.1.1 clinfo 42 | $ docker run -t -i --device /dev/dri:/dev/dri \ 43 | chihchun/hashcat-beignet hashcat -b 44 | 45 | The Intel OpenCL Driver requires XCB-DRI2 authentication, which must be running in X11 enviroment. Please run the following docker command from Desktop. Intel OpenCL SDK requires 4.4.0 kernel with patches, the docker image has been tested with Ubuntu 16.04. 46 | 47 | % docker run -t -i --device /dev/dri:/dev/dri -v $(pwd)/wip:/mnt \ 48 | -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \ 49 | chihchun/opencl-intel:2016R2 clinfo 50 | -------------------------------------------------------------------------------- /beignet/1.1.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV BEIGNET_VERSION=1.1.1-2 6 | 7 | RUN apt-get update \ 8 | && apt-get dist-upgrade -y \ 9 | && apt-get install -y beignet-opencl-icd=${BEIGNET_VERSION} clinfo 10 | 11 | # Clean up APT when done 12 | RUN apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 14 | -------------------------------------------------------------------------------- /beignet/1.1.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:yakkety 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV BEIGNET_VERSION=1.1.2-5 6 | 7 | RUN apt-get update \ 8 | && apt-get dist-upgrade -y \ 9 | && apt-get install -y beignet-opencl-icd=${BEIGNET_VERSION} clinfo 10 | 11 | # Clean up APT when done 12 | RUN apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 14 | -------------------------------------------------------------------------------- /hashcat/beignet/v3.00/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM chihchun/opencl-beignet:latest 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV HASHCAT_VERSION=3.00-3 6 | 7 | RUN apt-get update \ 8 | && apt-get -y install hashcat=${HASHCAT_VERSION} 9 | 10 | # Clean up APT when done 11 | RUN apt-get clean \ 12 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 13 | -------------------------------------------------------------------------------- /hashcat/beignet/v3.10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM chihchun/opencl-beignet 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV OPENHASH_VERSION=v3.10 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y build-essential git \ 9 | && apt-get build-dep -o APT::Get::Build-Dep-Automatic=true -y hashcat 10 | 11 | WORKDIR /tmp 12 | RUN git clone --depth 1 --branch $OPENHASH_VERSION \ 13 | https://github.com/hashcat/hashcat.git \ 14 | && cd hashcat \ 15 | && make linux64 \ 16 | && make install \ 17 | && ln -s /usr/bin/hashcat64.bin /usr/bin/hashcat64 18 | 19 | # Clean up APT when done 20 | RUN apt-get purge -y build-essential git \ 21 | && apt-get autoremove -y \ 22 | && apt-get clean \ 23 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 24 | -------------------------------------------------------------------------------- /hashcat/intel/v3.10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM chihchun/opencl-intel 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV OPENHASH_VERSION=v3.10 6 | 7 | RUN echo "deb-src http://tw.archive.ubuntu.com/ubuntu/ yakkety restricted main universe multiverse" >> /etc/apt/sources.list.d/yakkety.list 8 | RUN apt-get update \ 9 | && apt-get install -y build-essential git \ 10 | && apt-get build-dep -o APT::Get::Build-Dep-Automatic=true -y hashcat 11 | 12 | WORKDIR /tmp 13 | RUN git clone --depth 1 --branch $OPENHASH_VERSION \ 14 | https://github.com/hashcat/hashcat.git \ 15 | && cd hashcat \ 16 | && make linux64 \ 17 | && make install \ 18 | && ln -s /usr/bin/hashcat64.bin /usr/bin/hashcat64 19 | 20 | # Clean up APT when done 21 | RUN apt-get purge -y build-essential git \ 22 | && apt-get autoremove -y \ 23 | && apt-get clean \ 24 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 25 | -------------------------------------------------------------------------------- /intel/2016R2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | 6 | # OpenCL™ 2.0 Driver for Intel® HD, Iris™, and Iris™ Pro Graphics for Linux* (64-bit) 7 | ENV INTEL_DRIVER_URL=http://registrationcenter-download.intel.com/akdlm/irc_nas/9418/intel-opencl-2.0-2.0-54425.tar.gz 8 | # Intel® SDK for OpenCL™ Applications 2016 R2 for Linux* (64 bit) 9 | ENV INTEL_SDK_URL=http://registrationcenter-download.intel.com/akdlm/irc_nas/9553/intel_sdk_for_opencl_2016_ubuntu_6.2.0.1760_x64.tgz 10 | 11 | RUN apt-get update \ 12 | && apt-get dist-upgrade -y \ 13 | && apt-get install -y --no-install-recommends alien wget tar \ 14 | && apt-get install -y clinfo \ 15 | && apt-get install -y libxcb-dri3-0 libxcb-dri2-0 16 | 17 | WORKDIR /tmp 18 | RUN wget ${INTEL_DRIVER_URL} \ 19 | && wget ${INTEL_SDK_URL} 20 | 21 | # Install Driver 22 | RUN TARBALL=$(basename ${INTEL_DRIVER_URL}) \ 23 | && DIR=$(basename ${INTEL_DRIVER_URL} .tar.gz) \ 24 | && tar zxvf ${TARBALL} \ 25 | && for i in ${DIR}/*rpm ; do alien --to-deb $i ; done 26 | 27 | # Install SDK 28 | RUN TARBALL=$(basename ${INTEL_SDK_URL}) \ 29 | && DIR=$(basename ${INTEL_SDK_URL} .tgz) \ 30 | && tar zxvf ${TARBALL} \ 31 | && for i in ${DIR}/rpm/*.rpm ; do alien --to-deb $i ; done 32 | 33 | # Install the debian packages. 34 | RUN dpkg -i *.deb 35 | 36 | # Clean up APT when done 37 | RUN apt-get clean \ 38 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 39 | -------------------------------------------------------------------------------- /mesa/11.2.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV MESA_VERSION=11.2.0-1ubuntu2.1 6 | 7 | RUN apt-get update \ 8 | && apt-get dist-upgrade -y \ 9 | && apt-get install -y mesa-opencl-icd=${MESA_VERSION} clinfo 10 | 11 | # Clean up APT when done 12 | RUN apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 14 | -------------------------------------------------------------------------------- /mesa/12.0.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:yakkety 2 | MAINTAINER Rex Tsai "https://about.me/chihchun" 3 | 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV MESA_VERSION=12.0.1-3ubuntu2 6 | 7 | RUN apt-get update \ 8 | && apt-get dist-upgrade -y \ 9 | && apt-get install -y mesa-opencl-icd=${MESA_VERSION} clinfo 10 | 11 | # Clean up APT when done 12 | RUN apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 14 | --------------------------------------------------------------------------------