Dockerfile 2 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

# Support multiarch
RUN dpkg --add-architecture i386

# Add rocm repository
Paul's avatar
Paul committed
9
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl apt-utils wget software-properties-common
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

Paul's avatar
Paul committed
12
13
14
# Add ubuntu toolchain
RUN apt-get update && add-apt-repository ppa:ubuntu-toolchain-r/test -y

Paul's avatar
Paul committed
15
16
17
18
19
20
21
22
23
24
# 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
25
    g++-7 \
Paul's avatar
Paul committed
26
    gdb \
Paul's avatar
Paul committed
27
    git \
Paul's avatar
Paul committed
28
29
    hsa-rocr-dev \
    hsakmt-roct-dev \
Paul's avatar
Paul committed
30
    lcov \
Paul's avatar
Paul committed
31
32
    libelf-dev \
    libncurses5-dev \
Paul's avatar
Paul committed
33
    libnuma-dev \
Paul's avatar
Paul committed
34
    libpthread-stubs0-dev \
Paul's avatar
Paul committed
35
36
37
38
39
    python \
    python-dev \
    python-pip \
    rocm-opencl \
    rocm-opencl-dev \
Paul's avatar
Paul committed
40
    rocminfo \
Paul's avatar
Paul committed
41
42
43
44
45
46
    software-properties-common \
    wget && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Install cget
Paul's avatar
Paul committed
47
48
# RUN pip install cget
RUN pip install https://github.com/pfultz2/cget/archive/57b3289000fcdb3b7e424c60a35ea09bc44d8538.tar.gz
Paul's avatar
Paul committed
49

Paul's avatar
Paul committed
50
51
52
53
# Install rclone
RUN pip install https://github.com/pfultz2/rclone/archive/master.tar.gz

# Install hcc
Paul's avatar
Paul committed
54
RUN rclone -b roc-2.3.x -c fd93baed7dcc4fe8019b5fdc90213bfe7c298245 https://github.com/RadeonOpenCompute/hcc.git /hcc
Paul's avatar
Paul committed
55
56
RUN cget -p $PREFIX install hcc,/hcc

Paul's avatar
Use hcc  
Paul committed
57
# Use hcc
Paul's avatar
Paul committed
58
RUN cget -p $PREFIX init --cxx $PREFIX/bin/hcc
Paul's avatar
Paul committed
59

Paul's avatar
Paul committed
60
61
62
# Workaround hip's broken cmake
RUN ln -s $PREFIX /opt/rocm/hip
RUN ln -s $PREFIX /opt/rocm/hcc
Paul's avatar
Paul committed
63
64

# Install dependencies
Paul's avatar
Use hcc  
Paul committed
65
ADD dev-requirements.txt /dev-requirements.txt
Paul's avatar
Paul committed
66
ADD requirements.txt /requirements.txt
Paul's avatar
Paul committed
67
RUN cget -p $PREFIX install -f /dev-requirements.txt -DMIOPEN_CACHE_DIR=""
Paul's avatar
Paul committed
68

69
70
71
ENV MIOPEN_FIND_DB_PATH=/tmp/miopen/find-db
ENV MIOPEN_USER_DB_PATH=/tmp/miopen/user-db

Paul's avatar
Paul committed
72
73
ENV LD_LIBRARY_PATH=$PREFIX/lib

Paul's avatar
Paul committed
74
# Install doc requirements
Paul's avatar
Paul committed
75
76
ADD doc/requirements.txt /doc-requirements.txt
RUN pip install -r /doc-requirements.txt