clean up Dockerfile; add ROCM_VERSION arg and point to the versioned ROCm repo; remove obsoleted fedora dockerfile

This commit is contained in:
sunway513
2021-03-22 18:58:26 +00:00
parent 309dab4ce5
commit 9e9a8fd262
7 changed files with 12 additions and 59 deletions

View File

@@ -1,4 +1,7 @@
FROM centos:7
LABEL maintainer=peng.sun@amd.com
ARG ROCM_VERSION=4.1
# Base
RUN yum -y install git java-1.8.0-openjdk python; yum clean all
@@ -71,9 +74,9 @@ RUN yum install -y devtoolset-7-libatomic-devel devtoolset-7-elfutils-libelf-dev
# Install the ROCm rpms
RUN yum clean all
RUN echo -e "[ROCm]\nname=ROCm\nbaseurl=http://repo.radeon.com/rocm/yum/3.9\nenabled=1\ngpgcheck=0" >> /etc/yum.repos.d/rocm.repo
RUN echo -e "[ROCm]\nname=ROCm\nbaseurl=http://repo.radeon.com/rocm/yum/$ROCM_VERSION\nenabled=1\ngpgcheck=0" >> /etc/yum.repos.d/rocm.repo
RUN yum install -y rocm-dev
RUN yum install -y rocm-dev rocm-libs
# Set ENV to enable devtoolset7 by default
ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:/opt/rocm/hcc/bin:/opt/rocm/hip/bin:/opt/rocm/bin:/opt/rocm/hcc/bin:${PATH:+:${PATH}}

View File

@@ -1,12 +0,0 @@
# This dockerfile is meant to serve as a rocm base image. It registers the dnf rocm package repository, and
# installs the rocm-dev package.
FROM fedora:24
LABEL maintainer=kent.knox@amd
# Register the ROCM package repository, and install rocm-dev package
RUN dnf -y update \
&& printf "[remote]\nname=ROCm Repo\nbaseurl=http://repo.radeon.com/rocm/yum/rpm/\nenabled=1\ngpgcheck=0\n" | tee /etc/yum.repos.d/rocm.repo \
&& dnf -y install \
rocm-dev \
&& dnf -y clean all

View File

@@ -5,15 +5,17 @@ FROM ubuntu:18.04
LABEL maintainer=peng.sun@amd.com
# Register the ROCM package repository, and install rocm-dev package
ARG ROCM_VERSION=4.1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libnuma-dev gnupg \
&& curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/$ROCM_VERSION/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \
kmod \
file \
rocm-dev \
rocm-libs \
build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@@ -1,21 +0,0 @@
# This dockerfile is meant to serve as a rocm base image. It registers the debian rocm package repository, and
# installs the rocm-dev package.
FROM ubuntu:18.04
LABEL maintainer=peng.sun@amd.com
# Register the ROCM package repository, and install rocm-dev package
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libnuma-dev gnupg \
&& curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \
kmod \
file \
rocm-dev \
rocm-libs \
rccl \
build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@@ -5,9 +5,10 @@ FROM ubuntu:20.04
LABEL maintainer=peng.sun@amd.com
# Register the ROCM package repository, and install rocm-dev package
ARG ROCM_VERSION=4.1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libnuma-dev gnupg \
&& curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/$ROCM_VERSION/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \

View File

@@ -1,21 +0,0 @@
# This dockerfile is meant to serve as a rocm base image. It registers the debian rocm package repository, and
# installs the rocm-dev package.
FROM ubuntu:20.04
LABEL maintainer=peng.sun@amd.com
# Register the ROCM package repository, and install rocm-dev package
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libnuma-dev gnupg \
&& curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \
kmod \
file \
rocm-dev \
rocm-libs \
rccl \
build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@@ -15,9 +15,10 @@ MAINTAINER Peng Sun <Peng.Sun@amd.com>
# Initialize the image
# Modify to pre-install dev tools and ROCm packages
ARG ROCM_VERSION=4.1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl gnupg && \
curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && \
sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list' && \
sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/$ROCM_VERSION/ xenial main > /etc/apt/sources.list.d/rocm.list' && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1 \