diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c57b66b --- /dev/null +++ b/Dockerfile @@ -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 " + +# 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"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3369351 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ROCm™ Setup + +> ⚡ Not officially supported by AMD. \ No newline at end of file diff --git a/actions.yml b/actions.yml new file mode 100644 index 0000000..43d22e2 --- /dev/null +++ b/actions.yml @@ -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 \ No newline at end of file