Skip to content

Commit

Permalink
[DOCKER,CI] Add PAPI to docker images (apache#8016)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkonolige authored May 12, 2021
1 parent 1c09cf0 commit 5547163
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ RUN bash /install/ubuntu1804_install_llvm.sh
COPY install/ubuntu_install_dnnl.sh /install/ubuntu_install_dnnl.sh
RUN bash /install/ubuntu_install_dnnl.sh

COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
RUN bash /install/ubuntu_install_papi.sh ""

# Install MxNet for access to Gluon Model Zoo.
COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh
RUN bash /install/ubuntu_install_mxnet.sh
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ RUN bash /install/ubuntu_install_nnpack.sh
COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh
RUN bash /install/ubuntu_install_universal.sh

# PAPI profiling deps
COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
RUN bash /install/ubuntu_install_papi.sh "cuda rocm"

# Environment variables
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV PATH=/usr/local/cuda/bin:${PATH}
Expand Down
33 changes: 33 additions & 0 deletions docker/install/ubuntu_install_papi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

set -e
set -u
set -o pipefail

apt-get update --fix-missing

# deps
apt-get install -y linux-tools-common linux-tools-generic

cd /
git clone https://bitbucket.org/icl/papi.git
cd papi/src
export PAPI_CUDA_ROOT=/usr/local/cuda
./configure --with-components="$1"
make -j $(nproc) && make install

0 comments on commit 5547163

Please sign in to comment.