-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_driver.sh
51 lines (49 loc) · 2.14 KB
/
install_driver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
if [ -n $UBUNTU_VERSION ]
then
if [ -n $DRIVER_VERSION ]
then
if [ $DRIVER_VERSION == "21.30" ]
then
if [ $UBUNTU_VERSION == "20.04" ]
then
dpkg --add-architecture i386
apt-get update && apt-get -y dist-upgrade && \
apt-get -y --no-install-recommends install ca-certificates curl xz-utils initramfs-tools wget
curl -o amdgpu.tar.xz --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30 https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz
tar xf amdgpu.tar.xz --strip-components 1
./amdgpu-install -y --opencl=rocr,legacy --headless --no-dkms
rm -rf /tmp/*
apt-get -y remove curl xz-utils initramfs-tools
apt-get clean autoclean
exit
else
echo -e "UBUNTU_VERSION $UBUNTU_VERSION not supported with DRIVER_VERSION $DRIVER_VERSION"
exit
fi
elif [ $DRIVER_VERSION == "22.20" ]
then
if [ $UBUNTU_VERSION == "20.04" ]
then
apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends wget tar ca-certificates
curl -o amdgpu.deb --referer https://www.amd.com/en/support/graphics/radeon-500-series/radeon-rx-500x-series/radeon-rx-580x https://repo.radeon.com/amdgpu-install/22.20/ubuntu/focal/amdgpu-install_22.20.50200-1_all.deb && \
dpkg -i amdgpu.deb
elif [ $UBUNTU_VERSION == "22.04" ]
then
apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends wget tar ca-certificates
curl -o amdgpu.deb --referer https://www.amd.com/en/support/graphics/radeon-500-series/radeon-rx-500x-series/radeon-rx-580x https://repo.radeon.com/amdgpu-install/22.20/ubuntu/jammy/amdgpu-install_22.20.50200-1_all.deb && \
dpkg -i amdgpu.deb
else
echo -e "NO SUPPORT FOR UBUNTU_VERSION $UBUNTU_VERSION and DRIVER_VERSION $DRIVER_VERSION"
exit
fi
else
echo -e "DRIVER_VERSION $DRIVER_VERSION not supported"
exit
fi
else
echo -e "DRIVER_VERSION not set"
fi
else
echo -e "UBUNTU_VERSION not set"
fi