Skip to content

Commit

Permalink
Update Dockerfile for Ubuntu 22.04, ROCm 6.1.3 and CMake from repository
Browse files Browse the repository at this point in the history
  • Loading branch information
csbnw committed Jul 10, 2024
1 parent 79b631b commit fc96de5
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:22.04

LABEL com.github.actions.name="rocm-setup"
LABEL com.github.actions.description="Setup AMD ROCm™ Platform for GPUs"
Expand All @@ -9,25 +9,17 @@ LABEL repository="https://github.com/neoblizz/rocm-setup"
LABEL maintainer="Muhammad Awad <mawad@duck.com>"

# Install dependencies
RUN apt-get update && apt-get -y install wget build-essential git
RUN apt update && apt -y install wget build-essential git cmake

# Install ROCm
RUN wget https://repo.radeon.com/amdgpu-install/5.4/ubuntu/jammy/amdgpu-install_5.4.50400-1_all.deb
RUN apt-get -y install ./amdgpu-install_5.4.50400-1_all.deb
RUN DEBIAN_FRONTEND=noninteractive amdgpu-install --accept-eula -y --usecase=rocm,hiplibsdk --no-dkms
RUN wget https://repo.radeon.com/amdgpu-install/6.1.3/ubuntu/jammy/amdgpu-install_6.1.60103-1_all.deb
RUN apt -y install ./amdgpu-install_6.1.60103-1_all.deb
RUN DEBIAN_FRONTEND=noninteractive amdgpu-install --accept-eula -y --usecase=rocm,hiplibsdk --no-dkms

# Set environment variables
ENV PATH="$PATH:/opt/rocm/bin:/opt/rocm/rocprofiler/bin:/opt/rocm/hip/bin"
ENV LD_LIBRARY_PATH="/opt/rocm/lib:/opt/rocm/llvm/lib:/opt/rocm/hip/lib"

# Install CMake
ARG CMAKE_VERSION=3.25.1
RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh &&\
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh &&\
mkdir /opt/cmake && \
./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/opt/cmake &&\
ln -s /opt/cmake/bin/* /usr/local/bin/

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit fc96de5

Please sign in to comment.