-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSetup.Ubuntu20.04
More file actions
executable file
·87 lines (73 loc) · 3.8 KB
/
Setup.Ubuntu20.04
File metadata and controls
executable file
·87 lines (73 loc) · 3.8 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# Sets up Ubuntu 20.04 from bare-bones installation
# Comment out what you don't need or run line-by-line, manually
sudo apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive \
sudo apt-get -qq install -y cmake git vim gcc g++ gfortran software-properties-common \
python3 wget gnupg-agent pciutils \
mpich libmpich-dev \
openmpi-bin openmpi-doc libopenmpi-dev
# Installing latest GCC compiler (version 10)
sudo apt-get -qq install -y gcc-8 g++-8 gfortran-8 \
gcc-10 g++-10 gfortran-10
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-8 80 \
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-8 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-8
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-9 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-10 70 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-10 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-10
sudo chmod u+s /usr/bin/update-alternatives
sudo apt-get install -y --no-install-recommends \
ocl-icd-libopencl1 \
clinfo \
ocl-icd-opencl-dev
sudo mkdir -p /etc/OpenCL/vendors && \
sudo echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
# Intel graphics software for computation
#sudo wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
#sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
#sudo rm -f GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
#sudo echo "deb https://apt.repos.intel.com/oneapi all main" >> /etc/apt/sources.list.d/oneAPI.list
#sudo echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-graphics.list
#sudo apt-get -qq update && \
#sudo apt-get -qq install -y \
# intel-basekit-getting-started \
# intel-hpckit-getting-started \
# intel-oneapi-common-vars \
# intel-oneapi-common-licensing \
# intel-oneapi-dev-utilities \
# intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
# intel-oneapi-ifort \
# intel-opencl
# Generic OpenCL Loader
#sudo apt-get -qq update && \
# apt-get -qq install -y clinfo ocl-icd-libopencl1 ocl-icd-* opencl-headers
# #apt-get -qq install -y clinfo ocl-icd-libopencl1 ocl-icd opencl-headers && \
## Nvidia GPU software for computation
## See https://docs.nvidia.com/hpc-sdk/index.html for Nvidia install instructions
#sudo wget --no-verbose https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-20-9_20.9_amd64.deb
#sudo wget --no-verbose https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-2020_20.9_amd64.deb
# DEBIAN_FRONTEND=noninteractive \
# sudo apt-get install -y ./nvhpc-20-9_20.9_amd64.deb ./nvhpc-2020_20.9_amd64.deb && \
# sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
# ROCm software installation
#sudo apt-get -qq update && \
# apt-get -qq install -y libnuma-dev
#sudo wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | apt-key add -
#sudo echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' >> /etc/apt/sources.list.d/rocm.list
#sudo apt-get -qq update && \
# apt-get -qq install -y rocm-opencl-dev rocm-dkms
# Vendor OpenCL
#sudo apt-get -qq install -y mesa-opencl-icd
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
make clean
make