Commit d518b733 authored by Tobias Lasser's avatar Tobias Lasser

Docker/mkl dnn

parent 683564bc
Pipeline #194542 passed with stages
in 19 minutes and 43 seconds
......@@ -32,11 +32,25 @@ stages:
- build/
expire_in: 30 mins
.buildjob_script_clang:
script: &buildjob_clang
- mkdir -p build
- cd build
- cmake .. -GNinja -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-lc++abi"
- ninja -j 8
.buildjob_script_normal:
script: &buildjob_normal
- mkdir -p build
- cd build
- cmake .. -GNinja
- ninja -j 8
.job_template: &test_job_artifact
script:
- cd build
- cmake -DELSA_CREATE_JUNIT_REPORTS=ON ..
- make -j4 tests
- cmake -GNinja -DELSA_CREATE_JUNIT_REPORTS=ON ..
- ninja tests -j 8
artifacts:
reports:
junit: "build/test_reports/test_*.xml"
......@@ -56,7 +70,7 @@ clang-format:
clang-tidy:
stage: static-test
image: elsa/cuda:9.2
image: elsa/clang-tidy:8
script:
./tools/ci_scripts/clang-tidy.sh
tags:
......@@ -70,11 +84,7 @@ clang-tidy:
build-ubuntu:
<<: *build_job_artifact
image: elsa/ubuntu:18.04
script:
- mkdir -p build
- cd build
- cmake ..
- make -j4
script: *buildjob_normal
tags:
- linux
- elsa
......@@ -82,11 +92,7 @@ build-ubuntu:
build-gcc9:
<<: *build_job_artifact
image: elsa/gcc:9
script:
- mkdir -p build
- cd build
- cmake ..
- make -j4
script: *buildjob_normal
tags:
- linux
- elsa
......@@ -95,11 +101,7 @@ build-gcc9:
build-clang8:
<<: *build_job_artifact
image: elsa/clang:8
script:
- mkdir -p build
- cd build
- cmake .. -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-lc++abi"
- make -j4
script: *buildjob_clang
tags:
- linux
- elsa
......@@ -108,11 +110,7 @@ build-clang8:
build-cuda92:
<<: *build_job_artifact
image: elsa/cuda:9.2
script:
- mkdir -p build
- cd build
- cmake ..
- make -j4
script: *buildjob_normal
tags:
- linux
- elsa
......@@ -175,13 +173,11 @@ test-coverage:
image: elsa/cuda:9.2
dependencies: []
script:
- apt-get update
- apt-get install -y lcov
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DELSA_COVERAGE=ON ../
- make tests -j4
- make test_coverage
- cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DELSA_COVERAGE=ON ../
- ninja tests -j 8
- ninja test_coverage -j 8
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-coverage"
paths:
......@@ -243,10 +239,11 @@ deploy-docs:
script:
- mkdir -p build
- cd build
- cmake ..
- make docs
- cmake .. -GNinja
- ninja docs
- cp -r docs/sphinx/* /var/www/ip/elsadocs/
- cd ..
- cp -r build/test_coverage/* /var/www/ip/elsacoverage/
tags:
- elsa-docs-deploy
......@@ -20,9 +20,6 @@ function checkCPP(){
return 1
}
apt-get update
apt-get install clang-tidy-8 -y
clang-tidy-8 --version
echo
......
......@@ -6,10 +6,15 @@ LABEL Description="clang6 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget ca-certificates pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
......@@ -20,12 +25,25 @@ RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& export CXX=clang++ \
&& export CXXFLAGS="-std=c++17 -stdlib=libc++" \
&& export LDFLAGS="-lc++ -lc++abi" \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# fix libc++ paths
RUN ln -sf /usr/local/lib/libc++.a /usr/lib/x86_64-linux-gnu/libc++.a \
&& ln -sf /usr/local/lib/libc++.so.1.0 /usr/lib/x86_64-linux-gnu/libc++.so.1.0
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,10 +6,15 @@ LABEL Description="clang7 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget ca-certificates pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
......@@ -20,12 +25,25 @@ RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& export CXX=clang++ \
&& export CXXFLAGS="-std=c++17 -stdlib=libc++" \
&& export LDFLAGS="-lc++ -lc++abi" \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# fix libc++ paths
RUN ln -sf /usr/local/lib/libc++.a /usr/lib/x86_64-linux-gnu/libc++.a \
&& ln -sf /usr/local/lib/libc++.so.1.0 /usr/lib/x86_64-linux-gnu/libc++.so.1.0
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,10 +6,15 @@ LABEL Description="clang8 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget ca-certificates pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
......@@ -20,12 +25,25 @@ RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& export CXX=clang++ \
&& export CXXFLAGS="-std=c++17 -stdlib=libc++" \
&& export LDFLAGS="-lc++ -lc++abi" \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# fix libc++ paths
RUN ln -sf /usr/local/lib/libc++.a /usr/lib/x86_64-linux-gnu/libc++.a \
&& ln -sf /usr/local/lib/libc++.so.1.0 /usr/lib/x86_64-linux-gnu/libc++.so.1.0
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
FROM clang:9
MAINTAINER Tobias Lasser <lasser@in.tum.de>
LABEL Description="clang9 on Debian with cmake/git"
# install wget
RUN apt-get -qq update \
&& apt-get install -qqy wget ca-certificates pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& export CC=clang \
&& export CXX=clang++ \
&& export CXXFLAGS="-std=c++17 -stdlib=libc++" \
&& export LDFLAGS="-lc++ -lc++abi" \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# fix libc++ paths
RUN ln -sf /usr/local/lib/libc++.a /usr/lib/x86_64-linux-gnu/libc++.a \
&& ln -sf /usr/local/lib/libc++.so.1.0 /usr/lib/x86_64-linux-gnu/libc++.so.1.0
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
FROM nvidia/cuda:9.2-devel-ubuntu18.04
MAINTAINER Tobias Lasser <lasser@in.tum.de>
LABEL Description="clang-tidy 8 (with cuda9.2) develop with cmake/git"
# install wget
RUN apt-get -qq update \
&& apt-get install -qqy wget git pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install clang-tidy-8
RUN apt-get install -qqy clang-tidy-8
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,19 +6,40 @@ LABEL Description="cuda9.2 develop with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget git pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install lcov
RUN apt-get install -qqy lcov
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,19 +6,37 @@ LABEL Description="gcc6 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,19 +6,37 @@ LABEL Description="gcc7 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,19 +6,37 @@ LABEL Description="gcc8 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -6,19 +6,37 @@ LABEL Description="gcc9 on Debian with cmake/git"
RUN apt-get -qq update \
&& apt-get install -qqy wget pkg-config
# install ninja
RUN apt-get install -qqy ninja-build
# install OpenSSL for CMake
RUN apt-get install -qqy libssl-dev
# install CMAKE
ARG cmake_version=3.14.3
ARG cmake_version_short=3.14
ARG cmake_version=3.16.1
ARG cmake_version_short=3.16
ARG cmake_dir=cmake-${cmake_version}
RUN wget https://cmake.org/files/v${cmake_version_short}/${cmake_dir}.tar.gz \
&& tar -xvzf ${cmake_dir}.tar.gz \
&& rm ${cmake_dir}.tar.gz \
&& cd ${cmake_dir} \
&& ./configure \
&& make -j${nproc} && make install \
&& ./configure --parallel=28 \
&& make -j28 && make install \
&& cd .. && rm -rf ${cmake_dir} && ldconfig
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
......@@ -2,10 +2,23 @@ FROM ubuntu:18.04
MAINTAINER Tobias Lasser <lasser@in.tum.de>
LABEL Description="default Ubuntu 18.04 with build essentials"
# install build tools, cmake, git
# install build tools, cmake, git, ninja
RUN apt-get -qq update; \
DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
build-essential software-properties-common \
cmake git pkg-config
cmake git pkg-config ninja-build wget
# install Intel MKL-DNN
ARG mkldnn_version=1.1.1
ARG mkldnn_folder=v${mkldnn_version}
RUN wget https://github.com/intel/mkl-dnn/archive/${mkldnn_folder}.tar.gz \
&& tar -xvzf ${mkldnn_folder}.tar.gz \
&& rm ${mkldnn_folder}.tar.gz \
&& cd mkl-dnn-${mkldnn_version} \
&& mkdir build && cd build \
&& cmake .. \
&& make -j28 && make install \
&& cd ../.. && rm -rf mkl-dnn-${mkldnn_version} && ldconfig
CMD bash
#!/bin/sh
echo "Building docker image for Clang 6..."
docker build -t elsa/clang:6 - < DocFileClang6
echo "... building Clang 6 done."
echo "Building docker image for Clang 7..."
docker build -t elsa/clang:7 - < DocFileClang7
echo "... building Clang 7 done."
echo "Building docker image for Clang 8..."
docker build -t elsa/clang:8 - < DocFileClang8
echo "... building Clang 8 done."
echo "Building docker image for gcc 6..."
docker build -t elsa/gcc:6 - < DocFileGcc6
echo "... building gcc 6 done."
echo "Building docker image for gcc 7..."
docker build -t elsa/gcc:7 - < DocFileGcc7
echo "... building gcc 7 done."
echo "Building docker image for gcc 8..."
docker build -t elsa/gcc:8 - < DocFileGcc8
echo "... building gcc 8 done."
echo "Building docker image for gcc 9..."
docker build -t elsa/gcc:9 - < DocFileGcc9
echo "... building gcc 9 done."
echo "Building docker image for Cuda 9.2..."
docker build -t elsa/cuda:9.2 - < DocFileCuda92
echo "... building Cuda 9.2 done."
echo "Building docker image for Ubuntu 18.04..."
docker build -t elsa/ubuntu:18.04 - < DocFileUbuntu1804
echo "... building Ubuntu 18.04 done."
echo "Building docker image for Clang Tidy 8 (with CUDA 9.2)..."
docker build -t elsa/clang-tidy:8 - < DocFileClangTidy8
echo "... building Clang Tidy 8 (with CUDA 9.2) done."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment