Skip to content

Commit

Permalink
Let's start with a Docker based implementation. JavaScript is way mor…
Browse files Browse the repository at this point in the history
…e versatile.
  • Loading branch information
neoblizz committed May 22, 2023
1 parent d7f858d commit d67816b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:latest

LABEL com.github.actions.name="rocm-setup"
LABEL com.github.actions.description="Setup AMD ROCm™ Platform for GPUs"
LABEL com.github.actions.icon="box"
LABEL com.github.actions.color="red"

LABEL repository="https://github.com/neoblizz/rocm-setup"
LABEL maintainer="Muhammad Awad <[email protected]>"

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

# 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

# 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/

CMD ["/usr/sbin/sshd", "-D"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ROCm™ Setup

> ⚡ Not officially supported by AMD.
21 changes: 21 additions & 0 deletions actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'rocm-setup'
description: 'Setup AMD ROCm™ Platform for GPUs'
inputs:
rocm:
description: 'ROCm version'
required: false
default: '5.5.0'
method:
description: "Installation method, can be either 'amdgpu' or 'package-manager'. 'amdgpu' installs the ROCm packages using amdgpu-install script and the 'package-manager' method uses 'apt-get' like familiar packages."
required: false
default: 'local'
use-github-cache:
description: 'Use GitHub cache to cache downloaded installer on GitHub servers'
required: false
default: 'true'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: box
color: red

0 comments on commit d67816b

Please sign in to comment.