Dockerfile 1.61 KB
Newer Older
Paul's avatar
Paul committed
1
FROM ubuntu:xenial-20180417
Paul's avatar
Paul committed
2

Paul's avatar
Paul committed
3
ARG PREFIX=/usr/local
Paul's avatar
Paul committed
4
5
6
7
8
9

# Support multiarch
RUN dpkg --add-architecture i386

# Add rocm repository
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl apt-utils wget
Paul's avatar
Paul committed
10
RUN curl https://raw.githubusercontent.com/RadeonOpenCompute/ROCm-docker/master/add-rocm.sh | bash
Paul's avatar
Paul committed
11
12
13
14
15
16
17
18
19
20
21

# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
    apt-utils \
    build-essential \
    clang-5.0 \
    clang-format-5.0 \
    clang-tidy-5.0 \
    cmake \
    curl \
    doxygen \
Paul's avatar
Paul committed
22
    gdb \
Paul's avatar
Paul committed
23
    git \
Paul's avatar
Paul committed
24
25
    hsa-rocr-dev \
    hsakmt-roct-dev \
Paul's avatar
Paul committed
26
    lcov \
Paul's avatar
Paul committed
27
28
29
    libelf-dev \
    libncurses5-dev \
    libpthread-stubs0-dev \
Paul's avatar
Paul committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    libnuma-dev \
    python \
    python-dev \
    python-pip \
    rocm-opencl \
    rocm-opencl-dev \
    software-properties-common \
    wget && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Install cget
RUN pip install cget

Paul's avatar
Paul committed
44
45
46
47
48
49
50
# Install rclone
RUN pip install https://github.com/pfultz2/rclone/archive/master.tar.gz

# Install hcc
RUN rclone -b sanitizer1 https://github.com/RadeonOpenCompute/hcc.git /hcc
RUN cget -p $PREFIX install hcc,/hcc

Paul's avatar
Use hcc  
Paul committed
51
# Use hcc
Paul's avatar
Paul committed
52
RUN cget -p $PREFIX init --cxx $PREFIX/bin/hcc
Paul's avatar
Paul committed
53

Paul's avatar
Paul committed
54
55
56
57
# Workaround hip's broken cmake
RUN ln -s $PREFIX /opt/rocm/hip
RUN ln -s $PREFIX /opt/rocm/hcc

Paul's avatar
Paul committed
58
# Install dependencies
Paul's avatar
Use hcc  
Paul committed
59
ADD dev-requirements.txt /dev-requirements.txt
Paul's avatar
Paul committed
60
ADD requirements.txt /requirements.txt
Paul's avatar
Use hcc  
Paul committed
61
RUN cget -p $PREFIX install -f /dev-requirements.txt
Paul's avatar
Paul committed
62

Paul's avatar
Paul committed
63
64
ENV LD_LIBRARY_PATH=$PREFIX/lib

Paul's avatar
Paul committed
65
66
67
# Install doc requirements
# ADD doc/requirements.txt /doc-requirements.txt
# RUN pip install -r /doc-requirements.txt