This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-08-24 20:30:11 +03:00 committed by GitHub
parent 8291fe00be
commit e7768fd753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
rocm.sh
View File

@ -10,16 +10,21 @@ wget http://repo.radeon.com/rocm/apt/5.6/dists/jammy/main/binary-amd64/Packages
rm -rf /etc/apt/sources.list.d/pika* rm -rf /etc/apt/sources.list.d/pika*
rm -rf /etc/apt/preferences.d/*pika* rm -rf /etc/apt/preferences.d/*pika*
# temp
apt update
apt upgrade
# end of temp
for i in $(cat ./Packages | grep "Package: " | awk '{print $2}') for i in $(cat ./Packages | grep "Package: " | awk '{print $2}')
do do
# Get ROCm pool from pika # Get ROCm pool from pika
echo 'deb [arch=amd64 trusted=yes] https://ppa.pika-os.com/ lunar rocm' | sudo tee /etc/apt/sources.list.d/rocm-pika.list echo 'deb [arch=amd64 trusted=yes] https://ppa.pika-os.com/ lunar rocm' | sudo tee /etc/apt/sources.list.d/rocm-pika.list
apt update -y apt update --allow-unauthenticated -y
apt-cache show $i | grep Version: > ./$i-pika.txt apt-cache show $i | grep Version: > ./$i-pika.txt
rm -rf /etc/apt/sources.list.d/rocm-pika.list rm -rf /etc/apt/sources.list.d/rocm-pika.list
# Get ROCm pool # Get ROCm pool
echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
apt update -y apt update --allow-unauthenticated -y
apt-cache show $i | grep Version: > ./$i-repo.txt apt-cache show $i | grep Version: > ./$i-repo.txt
if [[ $(cat ./$i-pika.txt ) == $(cat ./$i-repo.txt ) ]] if [[ $(cat ./$i-pika.txt ) == $(cat ./$i-repo.txt ) ]]
then then
@ -28,7 +33,7 @@ do
echo $i >> pkglist.txt echo $i >> pkglist.txt
fi fi
done done
apt download $(cat ./pkglist.txt | tr '\n' ' ') -y apt download $(cat ./pkglist.txt | tr '\n' ' ') -y --allow-unauthenticated
# Return to ROCm MIRROR # Return to ROCm MIRROR
cd ../ cd ../
mkdir -p ./output mkdir -p ./output