Unverified Commit 1aaf3ee0 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add new combined container for compiling with GPU support.

parent 0338d578
Loading
Loading
Loading
Loading
+92 −0
Original line number Diff line number Diff line
BootStrap: docker
From: rocm/dev-ubuntu-18.04

%environment
    export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
    export CUDADIR=/usr/local/cuda
    export CUDA_PATH=/usr/local/cuda
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
    export LIBRARY_PATH=/usr/local/cuda/lib64/stubs
%post
    export DEBIAN_FRONTEND=noninteractive
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
    mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
    apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
    add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
    apt-get update
    apt-get upgrade --no-install-recommends -y
    apt-get install --no-install-recommends -y software-properties-common
    apt-get install --no-install-recommends -y \
        bc \
        build-essential \
        ccache \
        clang \
        cmake \
        cmake-curses-gui \
        cuda \
        cuda-compiler-10-2 \
        curl \
        doxygen \
        enchant \
        g++ \
        gcc \
        gfortran \
        git \
        hdf5-tools \
        kmod \
        less \
        libblas-dev \
        libeigen3-dev \
        libenchant-dev \
        libfftw3-dev \
        libgsl-dev \
        libhdf5-serial-dev \
        libhwloc-dev \
        libjpeg-dev \
        liblapack-dev \
        libomp-dev \
        libopenblas-dev \
        libnuma-dev \
        libpng-dev \
        libproj-dev \
        libvtk6-dev \
        make \
        mpi-default-bin \
        mpi-default-dev \
        ninja-build \
        python-dev \
        python-pip \
        python-pygments \
        python-virtualenv \
        python3-dev \
        python3-pip \
        python3-pkg-resources \
        python3-setuptools \
        python3-virtualenv \
        rocm-libs \
        rsync \
        ssh \
        vim-nox \
        virtualenv \
        voro++-dev \
        wget \
        xxd

    export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
    git clone -b master-rocm-3.3 https://github.com/ROCmSoftwarePlatform/hipCUB.git
    mkdir hipCUB/build
    cd hipCUB/build
    CXX=hcc cmake -D BUILD_TEST=off ..
    make -j4
    make package
    make install

    echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf
    echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf

%environment
    LC_ALL=C
    export LC_ALL

%labels
    Author rbberger