Adding sles support for rocthrust
MODIFY
Jenkinsfile
Jenkinsfile
@@ -17,7 +17,7 @@ rocThrustCI:
rocthrust.paths.build_command = './install'
// Define test architectures, optional rocm version argument is available
- def nodes = new dockerNodes(['gfx900 && ubuntu', 'gfx906 && ubuntu', 'gfx900 && centos7', 'gfx906 && centos7'], rocthrust)
+ def nodes = new dockerNodes(['ubuntu', 'sles', 'gfx900 && centos7', 'gfx906 && centos7'], rocthrust)
boolean formatCheck = false
@@ -55,7 +55,7 @@ rocThrustCI:
def command
- if(platform.jenkinsLabel.contains('centos'))
+ if(platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('sles'))
{
command = """#!/usr/bin/env bash
set -x
@@ -83,23 +83,23 @@ rocThrustCI:
def command
- if(platform.jenkinsLabel.contains('centos'))
+ if(platform.jenkinsLabel.contains('hip-clang'))
+ {
+ packageCommand = null
+ }
+ else if(platform.jenkinsLabel.contains('ubuntu'))
{
command = """
set -x
cd ${project.paths.project_build_prefix}/build/release
make package
rm -rf package && mkdir -p package
- mv *.rpm package/
- rpm -qlp package/*.rpm
+ mv *.deb package/
+ dpkg -c package/*.deb
"""
platform.runCommand(this, command)
- platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.rpm""")
- }
- else if(platform.jenkinsLabel.contains('hip-clang'))
- {
- packageCommand = null
+ platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.deb""")
}
else
{
@@ -108,12 +108,12 @@ rocThrustCI:
cd ${project.paths.project_build_prefix}/build/release
make package
rm -rf package && mkdir -p package
- mv *.deb package/
- dpkg -c package/*.deb
+ mv *.rpm package/
+ rpm -qlp package/*.rpm
"""
platform.runCommand(this, command)
- platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.deb""")
+ platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.rpm""")
}
}

MODIFY
docker/dockerfile-build-centos
docker/dockerfile-build-centos
-# Parameters related to building hip
+# Parameters related to building rocthrust
ARG base_image
FROM ${base_image}
@@ -19,11 +19,7 @@ RUN yum install -y \
clang \
clang-devel \
gcc-c++ \
- gcc-gfortran \
pkgconfig \
- python27 \
- python-yaml \
- PyYAML \
libcxx-devel \
boost-devel\
numactl-libs \

ADD
docker/dockerfile-build-sles
+# Parameters related to building rocthrust
+ARG base_image
+
+FROM ${base_image}
+LABEL maintainer="fei.zheng@amd.com"
+
+ARG user_uid
+
+# Install dependent packages
+# Dependencies:
+# * hcc-config.cmake: pkg-config
+# * libhsakmt.so: libnuma1
+RUN zypper -n update && zypper -n install\
+ rock-dkms \
+ sudo \
+ ca-certificates \
+ git \
+ gcc-c++ \
+ make \
+ cmake \
+ rpm-build \
+ dpkg \
+ libboost_program_options1_66_0-devel\
+ libcxxtools9 \
+ libnuma1
+
+# docker pipeline runs containers with particular uid
+# create a jenkins user with this specific uid so it can use sudo priviledges
+# Grant any member of sudo group password-less sudo privileges
+RUN useradd --create-home -u ${user_uid} -o -G video --shell /bin/bash jenkins && \
+ echo '%video ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd && \
+ chmod 400 /etc/sudoers.d/sudo-nopasswd

MODIFY
docker/dockerfile-build-ubuntu-rock
docker/dockerfile-build-ubuntu-rock
-# Parameters related to building hip
+# Parameters related to building rocthrust
ARG base_image
FROM ${base_image}
@@ -9,9 +9,6 @@ ARG user_uid
# Install dependent packages
# Dependencies:
# * hcc-config.cmake: pkg-config
-# * tensile: python2.7, python-yaml
-# * rocblas-test: gfortran, googletest
-# * rocblas-bench: libboost-program-options-dev
# * libhsakmt.so: libnuma1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
rock-dkms \

MODIFY
docker/dockerfile-install-centos
docker/dockerfile-install-centos
@@ -3,17 +3,3 @@ ARG base_image
FROM ${base_image}
LABEL maintainer="rocthrust-maintainer@amd.com"
-
-# Copy the rpm package of rocthrust into the container from host
-COPY *.rpm /tmp/
-
-# Install the rpm package, and print out contents of expected changed locations
-RUN yum -y update && yum install -y\
- /tmp/rocthrust-*.rpm \
- && rm -f /tmp/*.rpm \
- && yum -y clean all \
- && rm -rf /var/lib/apt/lists/* \
- && printf "ls -la /etc/ld.so.conf.d/\n" && ls -la /etc/ld.so.conf.d/ \
- && printf "ls -la /opt/rocm/include\n" && ls -la /opt/rocm/include \
- && printf "ls -la /opt/rocm/lib\n" && ls -la /opt/rocm/lib \
- && printf "ls -la /opt/rocm/lib/cmake\n" && ls -la /opt/rocm/lib/cmake \
\ No newline at end of file

ADD
docker/dockerfile-install-sles
+# Parameters related to building rocthrust
+ARG base_image
+
+FROM ${base_image}
+LABEL maintainer="rocthrust.maintainer@amd.com"

MODIFY
docker/dockerfile-install-ubuntu
docker/dockerfile-install-ubuntu
@@ -3,19 +3,3 @@ ARG base_image
FROM ${base_image}
MAINTAINER rocthrust-maintainer@amd.com
-
-# Copy the debian package of rocthrust into the container from host
-COPY *.deb /tmp/
-
-# Install the debian package
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --allow-unauthenticated -y \
- /tmp/rocthrust-*.deb \
- && rm -f /tmp/*.deb \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* \
- && printf "ls -la /etc/ld.so.conf.d/\n" && ls -la /etc/ld.so.conf.d/ \
- && printf "ls -la /opt/rocm/include\n" && ls -la /opt/rocm/include \
- && printf "ls -la /opt/rocm/lib\n" && ls -la /opt/rocm/lib \
- && printf "ls -la /opt/rocm/lib/cmake\n" && ls -la /opt/rocm/lib/cmake \
- && printf "ls -la /opt/rocm/rocthrust/include\n" && ls -la /opt/rocm/rocthrust/include \
- && printf "ls -la /opt/rocm/rocthrust/lib\n" && ls -la /opt/rocm/rocthrust/lib

MODIFY
install
install
@@ -113,17 +113,17 @@ fi
# Detect Linux distribution and store result in variable '$distro'
if [ -e /etc/redhat-release ] ; then
- distro='centos'
+ distro='redhat'
else
- distro='ubuntu'
+ distro='other'
fi
# now do different things depending on distro
case "$distro" in
- centos)
+ redhat)
CXX=$rocm_path/$compiler cmake3 -DBUILD_BENCHMARK=ON ../../.
;;
- ubuntu)
+ other)
CXX=$rocm_path/$compiler cmake -DBUILD_BENCHMARK=ON ../../. # or cmake-gui ../.
;;
esac

Adding sles support for rocthrust (#69)