Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable full Ubuntu 22.04 configuration for AMD MI300x #390

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ubuntu/ubuntu-22.x/ubuntu-22.04-hpc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ if [[ "$#" -gt 0 ]]; then
INPUT=$1
if [ "$INPUT" == "AMD" ]; then
GPUi="AMD"
echo "ERROR, the AMD pathway is not fully implemented yet."
exit 1
echo "Configuring VM for AMD GPUs."
elif [ "$INPUT" != "NVIDIA" ]; then
echo "Error: Invalid GPU type. Please specify 'NVIDIA' or 'AMD'."
exit 1
fi
fi


export GPU=$GPUi

# install pre-requisites
Expand Down
12 changes: 12 additions & 0 deletions ubuntu/ubuntu-22.x/ubuntu-22.04-hpc/install_rccl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#!/bin/bash
set -ex

pushd /tmp
wget https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5-linux-x86_64.tar.gz
Copy link

@hpourreza hpourreza Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like v3.30.5 is no longer available. Could you please use https://github.com/Kitware/CMake/releases/download/v3.30.6/cmake-3.30.6-linux-x86_64.tar.gz

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly suggest using the common utility functions to retrieve the version from versions.json, verify your download, and write the component version used to the component_versions.txt so that it's stored in the image for reference.

Most files have examples of doing this, but https://github.com/Azure/azhpc-images/blob/master/common/install_azcopy.sh is fairly simple. This should be done for all components that are being installed.

tar xzf cmake-3.30.5-linux-x86_64.tar.gz
pushd cmake-3.30.5-linux-x86_64
pushd bin
sudo mv -f ccmake cmake cpack ctest /usr/local/bin
popd
sudo cp -r share/cmake-3.30 /usr/local/share/
popd
rm -rf cmake-3.30.5-linux-x86_64*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add hash -r after removing the file to clear the stored path for cmake

popd

apt install libstdc++-12-dev
apt remove -y rccl
pushd ~
Expand Down
12 changes: 8 additions & 4 deletions ubuntu/ubuntu-22.x/ubuntu-22.04-hpc/install_rocm.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/bash
set -ex

#move to rocm package
./amdgpu-install -y --usecase=graphics,rocm
pushd /tmp
wget https://repo.radeon.com/amdgpu-install/6.2.2/ubuntu/jammy/amdgpu-install_6.2.60202-1_all.deb
sudo apt install -y ./amdgpu-install_6.2.60202-1_all.deb
rm -f amdgpu-install_6.2.60202-1_all.deb
popd

#move to rocm package
amdgpu-install -y --usecase=graphics,rocm

#Add self to render and video groups so they can access gpus.
usermod -a -G render $(logname)
usermod -a -G video $(logname)

#add future new users to the render and video groups.
echo 'ADD_EXTRA_GROUPS=1' | tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=render' | tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS="video render"' | tee -a /etc/adduser.conf

#add nofile limits
string_so="* soft nofile 1048576"
Expand Down