Skip to content

Commit

Permalink
Update default to ROCm 6.2
Browse files Browse the repository at this point in the history
* Add Ubuntu 24.04 stuffs
* Update default to Ubuntu 24.04 and ROCm 6.2
* Add USER_NAME argument
  • Loading branch information
aimoff committed Nov 19, 2024
1 parent 5f036d4 commit 06e1c2d
Show file tree
Hide file tree
Showing 21 changed files with 269 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OS_VARIANT=ubuntu-22.04
ROCM_VERSION=6.1
AMDGPU_VERSION=6.1
OS_VARIANT=ubuntu-24.04
ROCM_VERSION=6.2
AMDGPU_VERSION=6.2
TERM_FLAVOR=-complete-sdk
XTERM_FLAVOR=-complete
UID=
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

OS=${OS:-ubuntu}
OS_VERSION=${OS_VERSION:-22.04}
OS_VERSION=${OS_VERSION:-24.04}
OS_VARIANT=${OS_VARIANT:-${OS}-${OS_VERSION}}
ROCM_VERSION=${ROCM_VERSION:-6.1}
AMDGPU_VERSION=${AMDGPU_VERSION:-6.1}
ROCM_VERSION=${ROCM_VERSION:-6.2}
AMDGPU_VERSION=${AMDGPU_VERSION:-6.2}
#TERM_FLAVOR=""
TERM_FLAVOR="-complete-sdk"
XTERM_FLAVOR="-complete"
Expand Down
6 changes: 3 additions & 3 deletions dev/Dockerfile-ubuntu-22.04
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
FROM ubuntu:22.04

# Register the ROCM package repository, and install rocm-dev package
ARG ROCM_VERSION=6.1
ARG AMDGPU_VERSION=6.1
ARG ROCM_VERSION=6.2
ARG AMDGPU_VERSION=6.2

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils \
Expand All @@ -15,7 +15,7 @@ RUN apt-get update \
&& echo "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu jammy main" | tee /etc/apt/sources.list.d/amdgpu.list \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -y curl gnupg \
&& DEBIAN_FRONTEND=noninteractive apt-get --purge -y autoremove
COPY 90-rocm-jammy /etc/apt/preferences.d/
COPY rocm-pin-600 /etc/apt/preferences.d/

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
30 changes: 30 additions & 0 deletions dev/Dockerfile-ubuntu-24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This dockerfile is meant to serve as a rocm base image.
# It registers the debian rocm package repository, and installs the rocm-language-runtime package.

FROM ubuntu:24.04

# Register the ROCM package repository, and install rocm-dev package
ARG ROCM_VERSION=6.2
ARG AMDGPU_VERSION=6.2

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl gnupg \
&& curl -sL https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm.gpg \
&& echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION noble main" | tee /etc/apt/sources.list.d/rocm.list \
&& echo "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu noble main" | tee /etc/apt/sources.list.d/amdgpu.list \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -y curl gnupg \
&& DEBIAN_FRONTEND=noninteractive apt-get --purge -y autoremove
COPY rocm-pin-600 /etc/apt/preferences.d/

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
libelf1t64 \
kmod \
file \
python3 \
rocm-language-runtime \
rocminfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-complete
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-complete-sdk
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-hip
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-hip-sdk
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-ml
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-ml-sdk
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-opencl
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-opencl-sdk
1 change: 1 addition & 0 deletions dev/Dockerfile-ubuntu-24.04-openmp-sdk
2 changes: 1 addition & 1 deletion dev/90-rocm-jammy → dev/rocm-pin-600
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Explanation: ROCm APT Repository
Package: *
Pin: release o=repo.radeon.com, n=jammy
Pin: release o=repo.radeon.com
Pin-Priority: 600
50 changes: 24 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
version: '3'

services:
# The following defines application containers, which depend on the data-only
# containers defined above to provide their software layers
# These should be run with `docker-compose run --rm <application-service>`
base:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}
args:
ROCM_VERSION: ${ROCM_VERSION}
AMDGPU_VERSION: ${AMDGPU_VERSION}
Expand All @@ -19,10 +17,10 @@ services:
- /tmp

hip:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-hip
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-hip
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-hip
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-hip
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -33,10 +31,10 @@ services:
- /tmp

hip-sdk:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-hip-sdk
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-hip-sdk
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-hip-sdk
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-hip-sdk
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -47,10 +45,10 @@ services:
- /tmp

ml:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-ml
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-ml
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-ml
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-ml
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -61,10 +59,10 @@ services:
- /tmp

ml-sdk:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-ml-sdk
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-ml-sdk
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-ml-sdk
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-ml-sdk
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -75,10 +73,10 @@ services:
- /tmp

opencl:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-opencl
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-opencl
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-opencl
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-opencl
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -89,10 +87,10 @@ services:
- /tmp

opencl-sdk:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-opencl-sdk
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-opencl-sdk
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-opencl-sdk
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-opencl-sdk
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -103,10 +101,10 @@ services:
- /tmp

openmp-sdk:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-openmp-sdk
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-openmp-sdk
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-openmp-sdk
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-openmp-sdk
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -117,10 +115,10 @@ services:
- /tmp

complete:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-complete
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-complete
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-complete
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-complete
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -131,10 +129,10 @@ services:
- /tmp

complete-sdk:
image: rocm/dev-${OS_VARIANT:-ubuntu-22.04}:${ROCM_VERSION:-latest}-complete-sdk
image: rocm/dev-${OS_VARIANT:-ubuntu-24.04}:${ROCM_VERSION:-latest}-complete-sdk
build:
context: ./dev
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-complete-sdk
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-complete-sdk
args:
OS_VARIANT: ${OS_VARIANT}
ROCM_VERSION: ${ROCM_VERSION}
Expand All @@ -145,10 +143,10 @@ services:
- /tmp

term:
image: rocm/rocm-terminal:${ROCM_VERSION:-latest}
image: rocm/rocm-terminal:${ROCM_VERSION:-latest}-${OS_VARIANT:-ubuntu-24.04}
build:
context: ./rocm-terminal
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}
args:
ROCM_VERSION: ${ROCM_VERSION}
TERM_FLAVOR: ${TERM_FLAVOR:-complete-sdk}
Expand All @@ -165,10 +163,10 @@ services:
- /tmp:/tmp

xterm:
image: rocm/rocm-terminal:${ROCM_VERSION:-latest}-x11
image: rocm/rocm-terminal:${ROCM_VERSION:-latest}-${OS_VARIANT:-ubuntu-24.04}-x11
build:
context: ./rocm-terminal
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-22.04}-x11
dockerfile: Dockerfile-${OS_VARIANT:-ubuntu-24.04}-x11
args:
ROCM_VERSION: ${ROCM_VERSION}
TERM_FLAVOR: ${XTERM_FLAVOR:-complete}
Expand Down
11 changes: 6 additions & 5 deletions rocm-terminal/Dockerfile-ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

ARG ROCM_VERSION=6.1
ARG TERM_FLAVOR
ARG USER_NAME=rocm-user

FROM rocm/dev-ubuntu-20.04:${ROCM_VERSION}${TERM_FLAVOR}

Expand All @@ -37,17 +38,17 @@ RUN apt-get clean \
COPY sudo-nopasswd /etc/sudoers.d/sudo-nopasswd

# This is meant to be used as an interactive developer container
# Create user rocm-user as member of sudo group
# Create user $USER_NAME as member of sudo group
# Append /opt/rocm/bin to the system PATH variable
RUN UID_ADD=; [ -z "$UID" ] || UID_ADD="-u $UID"; \
if [ -z "$RENDER_GID" ]; then \
useradd --create-home $UID_ADD -G sudo,video --shell /bin/bash rocm-user; \
useradd --create-home $UID_ADD -G sudo,video --shell /bin/bash $USER_NAME; \
else \
groupadd -g $RENDER_GID render; \
useradd --create-home $UID_ADD -G sudo,video,render --shell /bin/bash rocm-user; \
useradd --create-home $UID_ADD -G sudo,video,render --shell /bin/bash $USER_NAME; \
fi
USER rocm-user
WORKDIR /home/rocm-user
USER $USER_NAME
WORKDIR /home/$USER_NAME
ENV PATH "${PATH}:/opt/rocm/bin"

# The following are optional enhancements for the command-line experience
Expand Down
7 changes: 4 additions & 3 deletions rocm-terminal/Dockerfile-ubuntu-20.04-x11
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

ARG ROCM_VERSION=6.1
ARG TERM_FLAVOR
ARG USER_NAME=rocm-user

FROM rocm/dev-ubuntu-20.04:${ROCM_VERSION}${TERM_FLAVOR}

Expand All @@ -28,7 +29,7 @@ RUN apt-get update \
python3-venv

# This is meant to be used as an interactive developer container
# Create user rocm-user as member of sudo group
# Create user $USER_NAME as member of sudo group
RUN UID_ADD=; [ -z "$UID" ] || UID_ADD="-u $UID"; \
if [ -z "$RENDER_GID" ]; then \
useradd --create-home $UID_ADD -G sudo,video --shell /bin/bash rocm-user; \
Expand Down Expand Up @@ -66,8 +67,8 @@ COPY start-dbus.sh /usr/local/bin
RUN chmod +x /usr/local/bin/start-dbus.sh

# Append /opt/rocm/bin to the system PATH variable
USER rocm-user
WORKDIR /home/rocm-user
USER $USER_NAME
WORKDIR /home/$USER_NAME
ENV PATH "${PATH}:/opt/rocm/bin"

# The following are optional enhancements for the command-line experience
Expand Down
13 changes: 7 additions & 6 deletions rocm-terminal/Dockerfile-ubuntu-22.04
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
# If it is desired to run the container manually through the docker command-line, the following is an example
# 'docker run -it --rm -v [host/directory]:[container/directory]:ro <user-name>/<project-name>'.

ARG ROCM_VERSION=6.1
ARG ROCM_VERSION=6.2
ARG TERM_FLAVOR

FROM rocm/dev-ubuntu-22.04:${ROCM_VERSION}${TERM_FLAVOR}

ARG UID
ARG RENDER_GID
ARG USER_NAME=rocm-user

# Initialize the image
# Modify to pre-install dev tools and ROCm packages
Expand All @@ -39,17 +40,17 @@ RUN apt-get clean \
COPY sudo-nopasswd /etc/sudoers.d/sudo-nopasswd

# This is meant to be used as an interactive developer container
# Create user rocm-user as member of sudo group
# Create user $USER_NAME as member of sudo group
# Append /opt/rocm/bin to the system PATH variable
RUN UID_ADD=; [ -z "$UID" ] || UID_ADD="-u $UID"; \
if [ -z "$RENDER_GID" ]; then \
useradd --create-home $UID_ADD -G sudo,video --shell /bin/bash rocm-user; \
useradd --create-home $UID_ADD -G sudo,video --shell /bin/bash $USER_NAME; \
else \
groupadd -g $RENDER_GID render; \
useradd --create-home $UID_ADD -G sudo,video,render --shell /bin/bash rocm-user; \
useradd --create-home $UID_ADD -G sudo,video,render --shell /bin/bash $USER_NAME; \
fi
USER rocm-user
WORKDIR /home/rocm-user
USER $USER_NAME
WORKDIR /home/$USER_NAME
ENV PATH "${PATH}:/opt/rocm/bin"

# The following are optional enhancements for the command-line experience
Expand Down
Loading

0 comments on commit 06e1c2d

Please sign in to comment.