Adding initial set Jenkinsfile and dockerfiles
For continuous integration enablement
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Parameters related to building hip
|
||||
ARG base_image
|
||||
|
||||
FROM ${base_image}
|
||||
MAINTAINER Kent Knox <kent.knox@amd>
|
||||
|
||||
ARG user_uid
|
||||
|
||||
# Install Packages
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
libelf-dev \
|
||||
rpm \
|
||||
&& \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# docker pipeline runs containers with uid 1000
|
||||
# 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} -G sudo --shell /bin/bash jenkins && \
|
||||
mkdir -p /etc/sudoers.d/ && \
|
||||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd
|
||||
@@ -0,0 +1,21 @@
|
||||
# Parameters related to building hip
|
||||
ARG base_image
|
||||
|
||||
FROM ${base_image}
|
||||
MAINTAINER Kent Knox <kent.knox@amd>
|
||||
|
||||
# Copy the debian package of hip 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 -y curl \
|
||||
&& curl -sL http://packages.amd.com/rocm/apt/debian/rocm.gpg.key | apt-key add - \
|
||||
&& echo deb [arch=amd64] http://packages.amd.com/rocm/apt/debian/ xenial main | tee /etc/apt/sources.list.d/rocm.list \
|
||||
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --allow-unauthenticated -y \
|
||||
/tmp/hip_base-*.deb \
|
||||
/tmp/hip_hcc-*.deb \
|
||||
/tmp/hip_doc-*.deb \
|
||||
/tmp/hip_samples-* \
|
||||
&& rm -f /tmp/*.deb \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
Viittaa uudesa ongelmassa
Block a user